[SERVER-23090] Write new dbhelpers for update, remove, find Created: 11/Mar/16 Updated: 05/Apr/16 Resolved: 01/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | Dianna Hohensee (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Sharding 11 (03/11/16), Sharding 12 (04/01/16) | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
These local commands are needed for making a local DistLockCatalog ( Non-network database finds/writes are becoming necessary for various improvements to the codebase: local DistLockCatalog, writeConcern improvements, and collection life cycle changes. The helpers will handle collection locking and optime updates. |
| Comments |
| Comment by Dianna Hohensee (Inactive) [ 01/Apr/16 ] |
|
Closing this because it's been split up into smaller tickets. |
| Comment by Randolph Tan [ 11/Mar/16 ] |
|
I propose we write something that can be mocked out to make it easy to write unittests for code using these helpers. |
| Comment by Judah Schvimer [ 11/Mar/16 ] |
|
When inserting, you first have to call "fixDocumentForInsert", then create the collection if it doesn't exist, and also make sure lastOp gets set if a write happens. It would be good to have a wrapper for this. insertMulti() exists in instance.cpp, which may be good enough, or could possibly be the basis for a wrapper with a simpler interface. |
| Comment by Andy Schwerin [ 11/Mar/16 ] |
|
Isn't insert reasonably easy to do using the catalog's Collection interface, judah.schvimer? I don't know if that's a criteria for omitting it, but it might be. |
| Comment by Judah Schvimer [ 11/Mar/16 ] |
|
writeConcern needs insert as well. |