-
Notifications
You must be signed in to change notification settings - Fork 103
Issue 6347 - better fix for desyncronized vlv cache #6358
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only cosmetic points. LGTM
| @@ -533,7 +549,7 @@ void dbmdb_log_dbi_set_fn(const char *file, int lineno, const char *funcname, co | |||
| Dl_info info = {0}; | |||
| dladdr(fn, &info); | |||
| /* Cannot use dbi_str here because slot is not yet up2date (so dbname is an argument) */ | |||
| dbg_log(file, lineno, funcname, DBGMDB_LEVEL_MDBAPI, "%s(txn=0x%p, dbi=%d <%s>, fn=0x%p <%s>)\n", action, txn, dbi, dbname, fn, info.dli_sname); | |||
| dbg_log(file, lineno, funcname, DBGMDB_LEVEL_MDBAPI, "%s(txn=0x%p, dbi=%d <%s>, fn=0x%p <%s>)\n", action, txn, dbi, dbname, fn, info.dli_sname); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not calling txn_loglvl() instead of DBGMDB_LEVEL_MDBAPI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
txn_log() is used only for txn related function It allows to log when txn are open and closed when
DBGMDB_LEVEL_MDBAPI or DBGMDB_LEVEL_TXN is set but log txn backtrace only if DBGMDB_LEVEL_TXN is set
| if (rc) { | ||
| break; | ||
| } | ||
| if (recno % RECNO_CACHE_INTERVAL == 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it good indentation here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
A better fix than PR 6349 about corrupted vlv cache Problem is a race condition because txn was released while building the cache. Solution keep the write txn open until the cache is fully rebuilt. Also fixed some debug logs And also added the source of a tool useful to check the vlv cache consistency Note: this remove PR #6349 and integrate PR #6356 Issue: #6347 Reviewed by @tbodaz (Thanks!) (cherry picked from commit 8366819)
A better fix than PR 6349 about corrupted vlv cache Problem is a race condition because txn was released while building the cache. Solution keep the write txn open until the cache is fully rebuilt. Also fixed some debug logs And also added the source of a tool useful to check the vlv cache consistency Note: this remove PR #6349 and integrate PR #6356 Issue: #6347 Reviewed by @tbodaz (Thanks!) (cherry picked from commit 8366819)
A better fix than PR 6349 about corrupted vlv cache
Problem is a race condition because txn was released while building the cache.
Solution keep the write txn open until the cache is fully rebuilt.
Also fixed some debug logs
And also added the source of a tool useful to check the vlv cache consistency
Note: this remove PR #6349 and integrate PR #6356
Issue: #6347
Reviewed by @tbodaz (Thanks!)