diff --git a/documentation/sphinx/source/release-notes/release-notes-620.rst b/documentation/sphinx/source/release-notes/release-notes-620.rst index 474af82201..5867dff174 100644 --- a/documentation/sphinx/source/release-notes/release-notes-620.rst +++ b/documentation/sphinx/source/release-notes/release-notes-620.rst @@ -4,6 +4,7 @@ Release Notes 6.2.33 ====== +* Fixed an issue where storage servers could shutdown with ``unknown_error``. `(PR #4380) `_ * Fix backup agent stall when writing to local filesystem with slow metadata operations. `(PR #4428) `_ * Backup agent no longer uses 4k block caching layer on local output files so that write operations are larger. `(PR #4428) `_ diff --git a/fdbserver/storageserver.actor.cpp b/fdbserver/storageserver.actor.cpp index 2fa187ceb2..1bda413d16 100644 --- a/fdbserver/storageserver.actor.cpp +++ b/fdbserver/storageserver.actor.cpp @@ -367,12 +367,19 @@ public: UID UIDofLongest; for (const auto& kv : startTimeMap) { const double currentRunningTime = currentTime - kv.second; - if (longest < currentRunningTime) { + if (longest <= currentRunningTime) { longest = currentRunningTime; UIDofLongest = kv.first; } } - return { longest, keyRangeMap.at(UIDofLongest) }; + if (BUGGIFY) { + UIDofLongest = deterministicRandom()->randomUniqueID(); + } + auto it = keyRangeMap.find(UIDofLongest); + if (it != keyRangeMap.end()) { + return { longest, it->second }; + } + return { -1, emptyKeyRange }; } int numRunning() const { return startTimeMap.size(); }