]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/dbstore: Use Object ID to handle racing writes
authorSoumya Koduri <skoduri@redhat.com>
Thu, 13 Jan 2022 20:44:19 +0000 (02:14 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Mon, 7 Feb 2022 02:09:55 +0000 (07:39 +0530)
commit38052496c809cdd0ed0d2f0e44cba873076c0855
treed9ee429be5da817ec768540741881e156cbb3f08
parentbad21fa497ea7b61033ceba5f923a80a47aa093b
rgw/dbstore: Use Object ID to handle racing writes

Create unique ID for each object upload which will be
atomically updated in the head object at the end. This will
prevent data corruption during concurrent writes.
Incase of Multipart Uploads, upload_id is used as ObjectID.

XXX: The stale or obsolete tail data needs to be deleted

Also addressed invalid usage of CephContext in dbstore tests.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
src/rgw/rgw_sal_dbstore.cc
src/rgw/store/dbstore/common/dbstore.cc
src/rgw/store/dbstore/common/dbstore.h
src/rgw/store/dbstore/dbstore_main.cc
src/rgw/store/dbstore/dbstore_mgr.h
src/rgw/store/dbstore/sqlite/sqliteDB.cc
src/rgw/store/dbstore/tests/dbstore_tests.cc