diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2021-05-31 16:42:11 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-02 22:32:50 +0000 |
commit | 9748e291b6a10e12b85c978d459fb6f6bf2d9ea3 (patch) | |
tree | 33405c1ac82fcf0d127748a6774122fe50164932 /src/mongo/db/s/dist_lock_catalog_replset.h | |
parent | 9f6598c1e321b88d7467547a2d0a80a92ae5a944 (diff) | |
download | mongo-9748e291b6a10e12b85c978d459fb6f6bf2d9ea3.tar.gz |
SERVER-57018 Make shards release their dist locks on step-up
Diffstat (limited to 'src/mongo/db/s/dist_lock_catalog_replset.h')
-rw-r--r-- | src/mongo/db/s/dist_lock_catalog_replset.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/s/dist_lock_catalog_replset.h b/src/mongo/db/s/dist_lock_catalog_replset.h index 0f0e3b184ea..a965a95f454 100644 --- a/src/mongo/db/s/dist_lock_catalog_replset.h +++ b/src/mongo/db/s/dist_lock_catalog_replset.h @@ -53,6 +53,7 @@ public: StatusWith<LocksType> grabLock(OperationContext* opCtx, StringData lockID, const OID& lockSessionID, + long long term, StringData who, StringData processId, Date_t time, @@ -62,6 +63,7 @@ public: StatusWith<LocksType> overtakeLock(OperationContext* opCtx, StringData lockID, const OID& lockSessionID, + long long term, const OID& currentHolderTS, StringData who, StringData processId, @@ -70,12 +72,12 @@ public: Status unlock(OperationContext* opCtx, const OID& lockSessionID, StringData name) override; - Status unlockAll(OperationContext* opCtx, const std::string& processID) override; + Status unlockAll(OperationContext* opCtx, + const std::string& processID, + boost::optional<long long> term) override; StatusWith<ServerInfo> getServerInfo(OperationContext* opCtx) override; - StatusWith<LocksType> getLockByTS(OperationContext* opCtx, const OID& lockSessionID) override; - StatusWith<LocksType> getLockByName(OperationContext* opCtx, StringData name) override; Status stopPing(OperationContext* opCtx, StringData processId) override; |