Fix for cyclemanager not resetting unregisterRequested
flag
#4420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's being changed:
Addresses: #4418
Callback
registered incyclecallbackgroup
can be unregistered or deactivated. Both of this actions used to overwriteshouldAbort
function passed tocallback
to always return positive value, indicating that long-runningcallback
should abort its execution whenever possible. OverwrittenshouldAbort
function was never restored aftercallback
was activated. As a resultcallback
once deactivated was never successfully activated again.To ensure all data already sent to database are included into backup, they have to persisted in files. Therefore memtables are forced to flush. Forced flush requires deactivating and activating back again background flush process responsible for flushing dirty memtables in intervals.
Due to bug described above, background flush process was not correctly resumed, resulting in data being stored in memory and wals until db shutdown (forced flush) or db restart (wal ingestion).
This fix makes sure
shouldAbort
function is restored to its original form whencallback
is activated after being deactivated.Review checklist