Details
Description
If two direct writes to a single time series bucket race with each other, we could end up releasing the bucket for inserts earlier than expected, and corrupt the bucket contents.
Consider the following sequence:
| Update1 | Update2 | Insert1 | Insert2 |
|
|-----------------------|---------------------------------|---------------------------------|-----------------------------------|
|
| Write to storage | | | |
|
| Set kDirectWriteStart | | | |
|
| | Write to storage | | |
|
| | Set kDirectWriteStart | | |
|
| | Abort + unset kDirectWriteStart | | |
|
| | | Reopen/fetch the bucket into BC | |
|
| | | ... | Insert into the same bucket in BC |
|
| | | | |
|
| Commit | | | |
|
| | | | Read doc updated by Update1 |
|
| | | | Write the stale diff |
|
Attachments
Issue Links
- is depended on by
-
SERVER-73533 Refactor the BucketState class to remove bit state flag
-
- Closed
-