[SERVER-23445] Implement a local find function and create new class LocalClient with testing Created: 31/Mar/16  Updated: 26/Apr/16  Resolved: 26/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: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done before SERVER-23446 Implement a local FindAndModify funct... Closed
has to be done before SERVER-23447 Implement a local update function in ... Closed
has to be done before SERVER-23475 Implement a remove function in LocalC... Closed
has to be done before SERVER-23535 Implement a local insert function in... Closed
Related
related to SERVER-23090 Write new dbhelpers for update, remov... Closed
Tested
Backwards Compatibility: Fully Compatible
Sprint: Sharding 12 (04/01/16), Sharding 13 (04/22/16)
Participants:
Linked BF Score: 0

 Description   

Needed for local DistLockCatalog implementation (SERVER-22655).



 Comments   
Comment by Benety Goh [ 06/Apr/16 ]

Update: 4/15/2016

I was mistaken - you don't need a WriteUnitOfWork to drop a collection.

****
This will make the leak go away in the test:

diff --git a/src/mongo/db/local_client_test.cpp b/src/mongo/db/local_client_test.cpp
index 3b77b81..35c855f 100644
--- a/src/mongo/db/local_client_test.cpp
+++ b/src/mongo/db/local_client_test.cpp
@@ -112,7 +112,9 @@ void setUpCollection(OperationContext* txn,
  */
 void dropCollection(OperationContext* txn, const NamespaceString& nss) {
     AutoGetOrCreateDb autoDb(txn, nss.db(), MODE_X);
-    ASSERT_EQUALS(Status::OK(), autoDb.getDb()->dropCollection(txn, nss.ns()));
+    WriteUnitOfWork wuow(txn);
+    ASSERT_OK(autoDb.getDb()->dropCollection(txn, nss.ns()));
+    wuow.commit();
 }

Comment by Dianna Hohensee (Inactive) [ 06/Apr/16 ]

It's been decided to abandon LocalClient. Reverting.

If this is ever brought back to life, local_client_test has an ASAN build error that must be fixed first: BF-2150.

Comment by Githook User [ 06/Apr/16 ]

Author:

{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}

Message: Revert "SERVER-23445 create LocalClient class for local queries/writes, implement a find query interface"

This reverts commit 02779909333ff4333c316b54b9fbb2fdd635e15a.
Branch: master
https://github.com/mongodb/mongo/commit/202fd419457c47650be27accb038a700134797ed

Comment by Githook User [ 05/Apr/16 ]

Author:

{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}

Message: SERVER-23445 create LocalClient class for local queries/writes, implement a find query interface
Branch: master
https://github.com/mongodb/mongo/commit/02779909333ff4333c316b54b9fbb2fdd635e15a

Generated at Thu Feb 08 04:03:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.