Will Berkeley has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/12600 )

Change subject: Fix potential duplicate scanner on /scans page
......................................................................

Fix potential duplicate scanner on /scans page

In rare scenarios, it is possible to see the same scanner listed twice
on the /scans page. This can happen because we gather the list in two
stages, first getting a list of in-flight scanners, and then getting a
list of recently completed scanners. Each is done under a lock and so
gives a consistent snapshot of in-flight or completed scanners,
respectively, but if a scanner completes between gathering the list of
in-flight scanners and gathering the list of completed scanners, it's
possible to see that same scanner listed as both in-flight and also as
completed.

This patch changes the logic a bit so we deduplicate the list of
scanners by scanner id, favoring keeping the information about a
complete scanner since it must be more up-to-date than information
about the scanner while it was in-flight.

Change-Id: I680546d80315a1548337a504c45afa4f2f0350ad
Reviewed-on: http://gerrit.cloudera.org:8080/12600
Reviewed-by: Adar Dembo <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Will Berkeley <[email protected]>
---
M src/kudu/tserver/scanners.cc
1 file changed, 16 insertions(+), 8 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Alexey Serbin: Looks good to me, approved
  Will Berkeley: Verified

--
To view, visit http://gerrit.cloudera.org:8080/12600
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I680546d80315a1548337a504c45afa4f2f0350ad
Gerrit-Change-Number: 12600
Gerrit-PatchSet: 3
Gerrit-Owner: Will Berkeley <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Will Berkeley <[email protected]>

Reply via email to