diff --git a/src/core.c b/src/core.c index bca12197..92b3d565 100644 --- a/src/core.c +++ b/src/core.c @@ -10568,7 +10568,7 @@ retry: if (unlikely(!ctx->retired_stored)) { /* Make sure last page of GC is touched and on retired-list */ rc = cursor_last(&ctx->cursor, nullptr, nullptr); - if (likely(rc != MDBX_SUCCESS)) + if (likely(rc == MDBX_SUCCESS)) rc = gcu_touch(ctx); if (unlikely(rc != MDBX_SUCCESS) && rc != MDBX_NOTFOUND) goto bailout;