1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-05-21 14:02:59 +08:00

Merge pull request from sfc-gh-etschannen/feature-fix-longest-time

Fixed an issue where storage servers shutdown because of unknown_error
This commit is contained in:
A.J. Beamon 2021-03-12 08:51:36 -08:00 committed by GitHub
commit 07d89d3d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions
documentation/sphinx/source/release-notes
fdbserver

@ -6,6 +6,7 @@ Release Notes
6.2.33
======
* Fixed an issue where storage servers could shutdown with ``unknown_error``. `(PR #4380) <https://github.com/apple/foundationdb/pull/4437>`_
* Fix backup agent stall when writing to local filesystem with slow metadata operations. `(PR #4428) <https://github.com/apple/foundationdb/pull/4428>`_
* Backup agent no longer uses 4k block caching layer on local output files so that write operations are larger. `(PR #4428) <https://github.com/apple/foundationdb/pull/4428>`_

@ -389,12 +389,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(); }