-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
3
-
NachoCheese - 2023-10-03
btree->last_recno gets updated in col_append_serial_func, where we're adding a new entry to the end of the btree and so might need to bump last_recno.
/* * Set the calling cursor's record number. If we extended the file, update the last record * number. */ *recnop = recno; if (recno > btree->last_recno) btree->last_recno = recno;
The trouble here is that the btree could be accessed or updated by multiple threads (it's a property of the dhandle), so concurrent appends could leave it in a bad state. For example, two threads have a local recno greater than btree->recno, attempt to update it, and the smaller value wins. This would result in data corruption since we would reuse an old record number the next time we append.
- related to
-
WT-11757 Remove compare_and_swap in __col_append_serial_func
- Closed