You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2025/03/19 17:45:21 UTC

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Alexey Serbin has uploaded this change for review. ( 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::IDLE 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)

This is a follow-up to 4e5cd00b62e6be94e410abf98dda6fb066c6e1bb.

Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
---
M src/kudu/util/threadpool.cc
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/22642/1
-- 
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: newchange
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
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 <al...@apache.org>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
---
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 <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Yifan Zhang, Kudu Jenkins, Abhishek Chennaka, 

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

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

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

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
---
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
2 files changed, 37 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/22642/2
-- 
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: newpatchset
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 1: Verified+1

unrelated test failures (RELEASE): KUDU-2501, KUDU-3601


-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Wed, 19 Mar 2025 19:56:08 +0000
Gerrit-HasComments: No

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22642/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/22642/1//COMMIT_MSG@10
PS1, Line 10: State::IDLE 
Is this IDLE state or RUNNING state?



-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Wed, 19 Mar 2025 23:36:38 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 2: Verified+1

unrelated test failures:
  * RELEASE: org.apache.kudu.spark.kudu.DefaultSourceTest
  * TSAN: org.apache.kudu.client.TestKuduClient


-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 20 Mar 2025 03:58:09 +0000
Gerrit-HasComments: No

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 2: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/1189/ : FAILURE


-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 20 Mar 2025 03:44:55 +0000
Gerrit-HasComments: No

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22642/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/22642/1//COMMIT_MSG@10
PS1, Line 10: State::IDLE 
> Is this IDLE state or RUNNING state?
Ah, indeed -- the issue was about transitioning from RUNNING state, and PS1 of this patch doesn't fix the issue, rather than removing the check on the invariant.

I'm planning to post a fix soon.

Thank you!



-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 20 Mar 2025 01:41:27 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.

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


Removed Verified-1 by Kudu Jenkins (120)
-- 
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: deleteVote
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 1:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/1187/


-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 19 Mar 2025 17:45:28 +0000
Gerrit-HasComments: No

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 1: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/1187/ : FAILURE


-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Wed, 19 Mar 2025 18:25:10 +0000
Gerrit-HasComments: No

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 2:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/1189/


-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Thu, 20 Mar 2025 02:23:45 +0000
Gerrit-HasComments: No

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.

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


Removed Verified-1 by Kudu Jenkins (120)
-- 
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: deleteVote
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>

[kudu-CR] [util] correct invariant in ThreadPoolToken::Transition()

Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/22642 )

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


Patch Set 2: Code-Review+2


-- 
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: comment
Gerrit-Change-Id: I6cfcdff743ad0074446ab9664dda43e4a9cb23ea
Gerrit-Change-Number: 22642
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Comment-Date: Fri, 21 Mar 2025 05:42:19 +0000
Gerrit-HasComments: No