Hello Alexey Serbin, Kudu Jenkins, helifu, Adar Dembo,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14287

to look at the new patch set (#3).

Change subject: KUDU-2952: fix TOCTOU race in reporting stats
......................................................................

KUDU-2952: fix TOCTOU race in reporting stats

It was possible for the following race to occur:

During CreateReportedTabletPB() as a follower:
1. T1 Get consensus state.
2. T1 Serialize the ConsensusStatePB under lock -- we are not the
   leader.
3. T2 Become the leader.
4. T1 Check if we're leader so that we can generate stats. This check
      succeeds.
5. T1 Populate the stats.
6. Our tablet report now contains stats even though the consensus state
   says we aren't the leader.
7. F0924 00:08:46.821594  9670 catalog_manager.cc:4239] Check failed: 
ts_desc->permanent_uuid() == report.consensus_state().leader_uuid()

This addresses this by checking leadership from the serialized consensus
state and adds a test that would fail pretty consistently without this
patch.

Change-Id: I29fe63cb42c82a08a4811d42b244abeb2fa86bd9
---
M src/kudu/integration-tests/ts_tablet_manager-itest.cc
M src/kudu/tserver/ts_tablet_manager.cc
M src/kudu/tserver/ts_tablet_manager.h
3 files changed, 54 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/87/14287/3
--
To view, visit http://gerrit.cloudera.org:8080/14287
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I29fe63cb42c82a08a4811d42b244abeb2fa86bd9
Gerrit-Change-Number: 14287
Gerrit-PatchSet: 3
Gerrit-Owner: Andrew Wong <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: helifu <[email protected]>

Reply via email to