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

Change subject: [util] correct invariant in ThreadPoolToken::Transition()
......................................................................

[util] correct invariant in ThreadPoolToken::Transition()

This patch corrects the invariant check when transitioning from
State::RUNNING to State::GRACEFUL_QUIESCING in ThreadPoolToken::Close().
Without this fix, a couple of test scenarios in threadpool-test
would fail with output like below:

  F20250319 10:15:25.060393 1859138 threadpool.cc:344] Check failed: 
active_threads_ > 0 (0 vs. 0)

I also added extra checks for into ThreadPoolToken::Transition() and
updated the inline documentation for ThreadPoolToken::State.

This is a follow-up to 4e5cd00b62e6be94e410abf98dda6fb066c6e1bb.

Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Reviewed-on: http://gerrit.cloudera.org:8080/22642
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Abhishek Chennaka <[email protected]>
---
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
2 files changed, 37 insertions(+), 20 deletions(-)

Approvals:
  Alexey Serbin: Verified
  Abhishek Chennaka: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <[email protected]>

Reply via email to