Fix corruption due to concurrent update during snapshot#7298
Conversation
cc58515 to
df19026
Compare
|
Warning Rate limit exceeded@agourlay has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 57 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR fixes the non-atomic copy on write by forcing the serialization of all updates.
During snapshot, a single write segment is shared by all proxy segments.
At the end of the segments snapshot process, deletes are propagated to the wrapped segments.
This happens concurrently with user update operations which are serialized through an update channel.
As demonstrated by the test
test_continuous_snapshot, it is possible that the delete propagation happens right in between of the CoW for theset_payloadoperation.This PR introduces a new update lock at the level of the segment holder to ensure that the snapshot process does not interfere with on-going client updates.