Alexey Serbin has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/16991 )

Change subject: KUDU-3237 fix MaintenanceManagerTest.TestCompletedOpsHistory
......................................................................

KUDU-3237 fix MaintenanceManagerTest.TestCompletedOpsHistory

This patch fixes a flakiness in the TestCompletedOpsHistory scenario.
The flakiness is a test-only issue which became apparent as a result of
the recent changes introduced into the MaintenanceManager with 9e4664d44
changelist.  In essence, with finer granularity of locking in the
scoped cleanup of the MaintenanceManager::LaunchOp() method, the test
thread calling MaintenanceManager::GetMaintenanceManagerStatusDump()
has a slight chance of acquiring 'completed_ops_lock_' ahead of the
thread executing the code in the LaunchOp()'s scoped cleanup.

This patch wraps the related code into ASSERT_EVENTUALLY to resolve
test-only race condition mentioned above.  I verified that this patch
fixes the issue by running the test scenario multiple times under
dist-test (RELEASE build).

Before: 2 out of 256 runs failed
  http://dist-test.cloudera.org//job?job_id=aserbin.1611806979.74192

After : 0 out of 256 runs failed
  http://dist-test.cloudera.org//job?job_id=aserbin.1611809676.95320

Change-Id: I760287b3ed4d50e32d2f9257e5390fdf8fa8f288
Reviewed-on: http://gerrit.cloudera.org:8080/16991
Tested-by: Alexey Serbin <aser...@cloudera.com>
Reviewed-by: Alexey Serbin <aser...@cloudera.com>
---
M src/kudu/util/maintenance_manager-test.cc
1 file changed, 21 insertions(+), 13 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved; Verified

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I760287b3ed4d50e32d2f9257e5390fdf8fa8f288
Gerrit-Change-Number: 16991
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Hao Hao <hao....@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to