diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-04-04 19:01:43 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-04-04 19:01:43 -0400 |
commit | 5e11e4484b84c8f913a4b14b24fbb7c9c46ee40f (patch) | |
tree | f421b3079b8a6b2736fcfdc775f7aa5dccd42f55 /src/mongo/db/storage/kv | |
parent | 828d427a13bfbce61bac9c40c05fab78e459fd03 (diff) | |
download | mongo-5e11e4484b84c8f913a4b14b24fbb7c9c46ee40f.tar.gz |
SERVER-23299 When starting mongod, clear temp flags from collections if appropriate.
See the description in SERVER-23299 for the definition of appropriate.
Diffstat (limited to 'src/mongo/db/storage/kv')
-rw-r--r-- | src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/storage/kv/kv_collection_catalog_entry.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp b/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp index 2381a80fff6..38a9d2b3b09 100644 --- a/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp +++ b/src/mongo/db/storage/kv/kv_collection_catalog_entry.cpp @@ -163,6 +163,12 @@ void KVCollectionCatalogEntry::updateFlags(OperationContext* txn, int newValue) _catalog->putMetaData(txn, ns().toString(), md); } +void KVCollectionCatalogEntry::clearTempFlag(OperationContext* txn) { + MetaData md = _getMetaData(txn); + md.options.temp = false; + _catalog->putMetaData(txn, ns().ns(), md); +} + void KVCollectionCatalogEntry::updateValidator(OperationContext* txn, const BSONObj& validator, StringData validationLevel, diff --git a/src/mongo/db/storage/kv/kv_collection_catalog_entry.h b/src/mongo/db/storage/kv/kv_collection_catalog_entry.h index 11cc4ecafc6..3a3704e82d5 100644 --- a/src/mongo/db/storage/kv/kv_collection_catalog_entry.h +++ b/src/mongo/db/storage/kv/kv_collection_catalog_entry.h @@ -68,6 +68,8 @@ public: void updateFlags(OperationContext* txn, int newValue) final; + void clearTempFlag(OperationContext* txn) final; + void updateValidator(OperationContext* txn, const BSONObj& validator, StringData validationLevel, |