Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotifyOnFlushCompleted not called if flush not successful #5206

Open
BenHuddleston opened this issue Apr 17, 2019 · 2 comments
Open

NotifyOnFlushCompleted not called if flush not successful #5206

BenHuddleston opened this issue Apr 17, 2019 · 2 comments

Comments

@BenHuddleston
Copy link

Expected behavior

NotifyOnFlushCompleted function is called regardless of the status of the flush and the status is passed through via the FlushInfo to the OnFlushCompleted event listener.

Actual behavior

NotifyOnFlushCompleted is only called if the flush is successful.

Steps to reproduce the behavior

Initiate a shutdown of a database between a NotifyOnFlushBegin and NotifyOnFlushCompleted call. The OnFlushCompleted call is never made.

@anand1976
Copy link
Contributor

It seems reasonable to always call NotifyOnFlushCompleted(). However, there is currently no status field defined in FlushJobInfo. It could be added, but I'm wary of breaking any existing code that might assume that the callback indicates an SST file has been created by the flush.

Is there any action your code needs to take if flush fails?

@BenHuddleston
Copy link
Author

That's understandable.

In my code we don't actually need the status of the flush, but we do need our OnFlushCompleted listener to be called even when a flush fails. We use the listeners to set thread local variables to track memory allocations via new and delete overrides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants