diff options
author | Maria van Keulen <maria@mongodb.com> | 2019-07-09 11:07:06 -0400 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2019-07-10 09:50:40 -0400 |
commit | 06b0e68c1bb0ee93425e28e9ca5e35926eca4fd2 (patch) | |
tree | b2c1b00ca9edd14d9813d1ac91dd92bb7626b1b4 /src/mongo/db | |
parent | 1a50f90ec4418b0e2f9bdadb79ea49684911b0fb (diff) | |
download | mongo-06b0e68c1bb0ee93425e28e9ca5e35926eca4fd2.tar.gz |
SERVER-41916 Log ident information upon WiredTiger alter failure
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index 0aa0f1f44f1..db309f66c1b 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -1342,13 +1342,19 @@ void WiredTigerKVEngine::alterIdentMetadata(OperationContext* opCtx, const IndexDescriptor* desc) { WiredTigerSession session(_conn); std::string uri = _uri(ident); + auto sessionHandle = session.getSession(); // Make the alter call to update metadata without taking exclusive lock to avoid conflicts with // concurrent operations. std::string alterString = WiredTigerIndex::generateAppMetadataString(*desc) + "exclusive_refreshed=false,"; - invariantWTOK( - session.getSession()->alter(session.getSession(), uri.c_str(), alterString.c_str())); + int ret = sessionHandle->alter(sessionHandle, uri.c_str(), alterString.c_str()); + if (ret) { + severe() << "Failed to alter ident metadata. Uri: " << uri << " Ret: " << ret + << " Ident: " << ident << " alterString: " << redact(alterString) + << " Msg: " << sessionHandle->strerror(sessionHandle, ret); + fassertFailed(31013); + } } Status WiredTigerKVEngine::dropIdent(OperationContext* opCtx, StringData ident) { |