]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/dbstore: No need for explicit LOCK in DBStore
authorSoumya Koduri <skoduri@redhat.com>
Mon, 1 Nov 2021 06:21:29 +0000 (11:51 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Mon, 1 Nov 2021 06:29:27 +0000 (11:59 +0530)
The current form of DBStore is not suited for multiple writers
scenario. Hence no need for explicit mutex lock in DBStore but
rather rely on inherent sqlite locking mechanism.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
src/rgw/store/dbstore/common/dbstore.cc

index 7cf8c44413ba29e0bb444cdd22230f461e230089..c771763ff7f046bc3fe234075b557fb1c4b815c1 100644 (file)
@@ -250,17 +250,14 @@ int DB::ProcessOp(const DoutPrefixProvider *dpp, string Op, struct DBOpParams *p
   int ret = -1;
   class DBOp *db_op;
 
-  Lock(dpp);
   db_op = getDBOp(dpp, Op, params);
 
   if (!db_op) {
     ldpp_dout(dpp, 0)<<"No db_op found for Op("<<Op<<")" << dendl;
-    Unlock(dpp);
     return ret;
   }
   ret = db_op->Execute(dpp, params);
 
-  Unlock(dpp);
   if (ret) {
     ldpp_dout(dpp, 0)<<"In Process op Execute failed for fop(" \
       <<Op.c_str()<<") " << dendl;