From a0728023cdabffd07463977633b2307a94e307d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Wed, 16 Feb 2022 15:40:50 +0300 Subject: [PATCH] mdbx: fix typo in a retained space calculation for the hsr-callback. --- src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 51840849..4f7b9b8a 100644 --- a/src/core.c +++ b/src/core.c @@ -20785,8 +20785,8 @@ __cold static txnid_t mdbx_kick_longlived_readers(MDBX_env *env, const uint64_t head_retired = unaligned_peek_u64(4, head_meta->mm_pages_retired); const size_t space = - (oldest_retired > head_retired) - ? pgno2bytes(env, (pgno_t)(oldest_retired - head_retired)) + (head_retired > oldest_retired) + ? pgno2bytes(env, (pgno_t)(head_retired - oldest_retired)) : 0; int rc = env->me_hsr_callback( env, env->me_txn, pid, (mdbx_tid_t)tid, laggard,