diff options
author | Daniel Gottlieb <daniel.gottlieb@10gen.com> | 2017-03-29 10:12:11 -0400 |
---|---|---|
committer | Daniel Gottlieb <daniel.gottlieb@10gen.com> | 2017-03-29 10:30:56 -0400 |
commit | 71a149b45c8bb019cbc8179f4a411be66bda2062 (patch) | |
tree | 913ef172bdc01e8af2b3146f8379dce96162955d /src/mongo/db/storage/README.md | |
parent | 73b7ae2efdc3d996b1b9bda5ea6ac44fa0e81311 (diff) | |
download | mongo-71a149b45c8bb019cbc8179f4a411be66bda2062.tar.gz |
SERVER-27831: Push threadsafety responsibility inside of KVCatalog's RecordStore
RecordStores that don't implement document level locking are typically
protected from concurrent reads and writes. However one exception is the
RecordStore passed into KVCatalog. Previously, if
StorageEngine::supportsDocLocking was false, the KVCatalog would use
an additional lock that participated in two phase locking to ensure
reader-writer protection to the underlying record store (and more
specifically, delay releasing until any potential rollbacks were
processed). However, access to the catalog can happen anywhere and this
lock did not have a formally assigned acquisition time relative to other
locks resulting in potential deadlocks.
This patch forces the thread-safety requirement into the RecordStore.
Specifically, EphemeralForTest was changed to acquire a finer grained
lock (i.e: does not participate in two-phase locking) to protect its
internal state. Now that the lock exists inside EphemeralForTest, it is
also able to grab the lock when needed for the onCommit/onRollback
callbacks.
Diffstat (limited to 'src/mongo/db/storage/README.md')
-rw-r--r-- | src/mongo/db/storage/README.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/storage/README.md b/src/mongo/db/storage/README.md index 755bd173915..8326f47c8ae 100644 --- a/src/mongo/db/storage/README.md +++ b/src/mongo/db/storage/README.md @@ -107,7 +107,7 @@ details. * [KVEngine](kv/kv_engine.h) * [RecordStore](record_store.h) -* [RecoveryUnit](ecovery_unit.h) +* [RecoveryUnit](recovery_unit.h) * [SeekableRecordCursor](record_store.h) * [SortedDataInterface](sorted_data_interface.h) * [ServerStatusSection](../commands/server_status.h) |