[SERVER-55342] WiredTigerSession::CursorCache should ensure that checked-out cursor has correct overwrite setting Created: 19/Mar/21  Updated: 06/Dec/22  Resolved: 09/May/22

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Backlog - Storage Execution Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-55681 Collections clustered by _id need to ... Closed
related to WT-7393 Allow changing the "overwrite" settin... Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

Right now it does not consider the overwrite setting when deciding whether it can use a cached cursor. It kinda works right now because we always use the same setting for all cursors on a given table, but it is a bug waiting to happen. Also, if we start using LSM trees, there are cases where we would want to mix overwrite settings for a single table.

Since overwrite is one of the settings that you can change with WT_CURSOR->reconfigure() we are able to reuse cursors created with the wrong overwrite setting. We should check how expensive it is to just always set it to the desired value on checkout to avoid needing to remember what the old value was. This gets more complicated if we allow changing the overwrite setting for some operations on mongodb-level write cursors in SERVER-55337, so even if it is too expensive at first, it is probably better to work with the WT team to make it cheaper than to avoid calling it.



 Comments   
Comment by Connie Chen [ 09/May/22 ]

Since WT-7393 works as designed, we're closing this as "won't do"

Comment by Githook User [ 07/Apr/21 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: Revert "SERVER-55342 Clustered collections should reject duplicate _id values"

This reverts commit 8cdac63ac18aa2e852d7450885fef71113ff0464.
Branch: master
https://github.com/mongodb/mongo/commit/e59d95b4dc565bade90426730a9415bc9be50e07

Comment by Githook User [ 07/Apr/21 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-55342 Clustered collections should reject duplicate _id values

The WiredTigerSessionCache should not mix cursors with different
overwrite settings.
Branch: master
https://github.com/mongodb/mongo/commit/8cdac63ac18aa2e852d7450885fef71113ff0464

Comment by Louis Williams [ 06/Apr/21 ]

This exact solution will not be implemented for SERVER-55681, but we should consider this for the future.

Comment by Mathias Stearn [ 06/Apr/21 ]

WT-7393 is an alternative, and in my opinion better, solution to this issue.

Comment by Louis Williams [ 05/Apr/21 ]

This should be done by SERVER-55681, to reject duplicate _id on clustered collections, since RecordStores need to mix "overwrite" configurations for cursors doing different operations.

Generated at Thu Feb 08 05:36:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.