Closed sumit-kushwah closed 1 year ago
@gquintard @slimhazard Please look into it. if this fixes the issue.
Hi @sumit-kushwah, thank you, but I think you are going about this the wrong way: we should first have a test case that reproduces the issue, then fix the bug. My intuition tells me that it's indeed the cause, but we need solid proof before changing the code.
OK @gquintard . Your concern seems reasonable. I will try to reproduce the bug and see this block parameter check is the only issue.
hold on, I think I have a reproducer and a fix, I'll open a PR tonight
In this PR I have added a check for block parameter in
run_gc
function while removing expired buckets. We should keep blocked buckets until their block duration has ended, even if their expiration period has already ended.I have added below condition in code.
x->block == 0
condition check that bucket is not currently blocked.now > x->block
condition check that if the current time is greater than the end time the bucket was blocked.This PR fixes the issue #206