mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-38597 Add drop-pending ident counter to serverStatus
This commit is contained in:
parent
c338365277
commit
3b028cfc6f
@ -74,6 +74,9 @@
|
||||
mydb.getName() + ' after dropping collection ' + coll.getFullName() +
|
||||
'. Before: ' + tojson(collectionsBeforeDrop) + '. After: ' +
|
||||
tojson(collectionsAfterDrop));
|
||||
assert.gt(mydb.serverStatus().storageEngine.dropPendingIdents,
|
||||
0,
|
||||
'There is no drop pending ident in the storage engine.');
|
||||
}
|
||||
|
||||
const renameTargetColl = node.getCollection(renameTargetCollName);
|
||||
|
@ -91,6 +91,9 @@ public:
|
||||
std::string getFilesystemPathForDb(const std::string& dbName) const final {
|
||||
return "";
|
||||
}
|
||||
std::set<std::string> getDropPendingIdents() const final {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -355,6 +355,10 @@ public:
|
||||
return _timestampMonitor.get();
|
||||
}
|
||||
|
||||
std::set<std::string> getDropPendingIdents() const {
|
||||
return _dropPendingIdentReaper.getAllIdents();
|
||||
}
|
||||
|
||||
private:
|
||||
using CollIter = std::list<std::string>::iterator;
|
||||
|
||||
|
@ -354,6 +354,11 @@ public:
|
||||
*/
|
||||
virtual bool supportsPendingDrops() const = 0;
|
||||
|
||||
/**
|
||||
* Returns a set of drop pending idents inside the storage engine.
|
||||
*/
|
||||
virtual std::set<std::string> getDropPendingIdents() const = 0;
|
||||
|
||||
/**
|
||||
* Clears list of drop-pending idents in the storage engine.
|
||||
* Used primarily by rollback after recovering to a stable timestamp.
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
<< engine->supportsReadConcernMajority()
|
||||
<< "supportsPendingDrops"
|
||||
<< engine->supportsPendingDrops()
|
||||
<< "dropPendingIdents"
|
||||
<< static_cast<long long>(engine->getDropPendingIdents().size())
|
||||
<< "supportsSnapshotReadConcern"
|
||||
<< engine->supportsReadConcernSnapshot()
|
||||
<< "readOnly"
|
||||
|
Loading…
Reference in New Issue
Block a user