This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch branch-1.9.x
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/branch-1.9.x by this push:
new 34d9036 [tools] fix race in FetchInfoFromTabletServers()
34d9036 is described below
commit 34d90369ef64045f2490d854ed4e5a41dd3b8cdb
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu May 9 22:11:11 2019 -0700
[tools] fix race in FetchInfoFromTabletServers()
Fixed race in FetchInfoFromTabletServers() while fetching information
from multiple tablet servers.
In the master branch, the race is fixed with changelist
d17f9fce684272df28e6291839f162b33796bc5c, which also brings improvements
for concurrency while running ksck and other related CLI tools. This
patch is targeted for the stable branch, so it only fixes the race
condition.
Change-Id: I2f3f0e3f5115a46dd3afc83dda75e7241618eea4
Reviewed-on: http://gerrit.cloudera.org:8080/13301
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
src/kudu/tools/ksck.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/kudu/tools/ksck.cc b/src/kudu/tools/ksck.cc
index a49d53f..f29d436 100644
--- a/src/kudu/tools/ksck.cc
+++ b/src/kudu/tools/ksck.cc
@@ -358,6 +358,7 @@ Status Ksck::FetchInfoFromTabletServers() {
// Failing to gather flags is only a warning.
s = ts->FetchUnusualFlags();
if (!s.ok()) {
+ std::lock_guard<simple_spinlock>
lock(tablet_server_summaries_lock);
results_.warning_messages.push_back(s.CloneAndPrepend(Substitute(
"unable to get flag information for tablet server $0 ($1)",
ts->uuid(),