Replies: 1 comment
-
Some possibilities for the writer that is racing with
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to the comments in dbuf.h,
db.db_data
is protected bydb_mtx
, whiledb_buf
is protected bydb_rwlock
. That's been the case ever since f664f1e . However, the code seems a little bit inconsistent. Here's a table of a few selected functions, and which fields they protect with which locks.I can't find any examples of a function that takes
db_rwlock
just to protectdb_mtx
. I think that what should be happening is thatdb_buf
is protected bydb_mtx
, anddb.db_data
should be protected bydb_rwlock
(or perhaps protected by both?). Can anybody please help me understand this? It's not merely an academic exercise either. I suspect that locking mistakes ondb.db_data
are responsible for #16626 and the corruption described in #17077 . cc @pcd1193182Beta Was this translation helpful? Give feedback.
All reactions