-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Bad assertion in DBImpl::MarkLogsSynced()
#872
Comments
Let me take a look. |
@bdbyrne other than SyncWAL(), do you do normal sync writes? |
I don't quite understand what you described, but I can repro the assert failure by having SyncWAL() run concurrently with log rolling: https://reviews.facebook.net/D54621 Is there a way you can verify whether it is the problem you ran into? |
Yes, normal sync writes are used quite heavily in my environment, where various updates are required to be persistent before being acknowledged. Your fix is similar to mine, so I can say it resolves my issue. Thanks for investigating, @siying. |
Closing this via automation due to lack of activity. If discussion is still needed here, please re-open or create a new/updated issue. |
I'm hitting the following assertion in
DBImpl::MarkLogsSynced()
:assert(logs_.empty() || (logs_.size() == 1 && !logs_[0].getting_synced));
This appears to be due to a
DBImpl::SyncWAL()
call that sets exactly 0 logs togetting_synced = true
, because the loop breaks immediately from conditionit->number <= current_log_number
failing. The mutex is unlocked, during which time anotherDBImpl::SyncWAL()
is called that marks the first entry withgetting_synced = true
. The first call reacquires the mutex, then entersDBImple::MarkLogSynced()
, tripping on the assertion.I would appreciate someone verifying the scenario is valid and performing the appropriate fix.
The text was updated successfully, but these errors were encountered: