[SERVER-47824] Ban transaction snapshot reads on capped collections Created: 28/Apr/20 Updated: 29/Oct/23 Resolved: 20/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Lingzhi Deng | Assignee: | Ali Mir |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Repl 2020-06-15, Repl 2020-07-27 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Capped collections typically (always?) delete records with an unreplicated/untimestamped write. Those deletions will always become visible in a newer transaction. So if a transaction uses snapshot with an atClusterTime (e.g. coming from mongos), it may not see some deleted documents even if they existed at the point in time requested. Snapshot transactions without atClusterTime might still work if the snapshot is open before the deletions happen probably because they hold onto the WT txn and the snapshot. But I am not 100% sure. Either way, it seems that we will still have to ban transaction snapshot reads on capped collections unless we choose to timestamp the capped collection deletions. |
| Comments |
| Comment by Githook User [ 20/Jul/20 ] |
|
Author: {'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}Message: |
| Comment by Githook User [ 20/Jul/20 ] |
|
Author: {'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}Message: |
| Comment by Tess Avitabile (Inactive) [ 25/Jun/20 ] |
|
Sounds good, thank you! |
| Comment by Evin Roesle [ 25/Jun/20 ] |
|
I would prefer option 1 to Ban all operations on capped collections from transactions in 4.6+. |
| Comment by Tess Avitabile (Inactive) [ 25/Jun/20 ] |
|
I ran lingzhi.deng's repro with a sharded cluster as well, to confirm that this problem exists for a sharded cluster (we don't expect atClusterTime to be used for transactions on replica sets). Thus the scope of the problem is that on version 4.2+, for transactions run with readConcern level snapshot on sharded clusters, reads from capped collections may return inconsistent data. In Our options are:
evin.roesle, what is your preference? |