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/12 06:44:16 UTC

[kudu-CR] WIP [util] introduce ThreadPoolToken::Close()

Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22614


Change subject: WIP [util] introduce ThreadPoolToken::Close()
......................................................................

WIP [util] introduce ThreadPoolToken::Close()

WIP:
  * add more tests
  * add proper description

Change-Id: Ic226319c191af666233ec735c1787389d051b039
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 250 insertions(+), 24 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/14/22614/1
-- 
To view, visit http://gerrit.cloudera.org:8080/22614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 6:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 6
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-Comment-Date: Thu, 13 Mar 2025 23:31:38 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

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

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

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 340 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/14/22614/5
-- 
To view, visit http://gerrit.cloudera.org:8080/22614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 5
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)

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 7: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 7
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-Comment-Date: Fri, 14 Mar 2025 23:58:26 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22614/3/src/kudu/util/threadpool.h
File src/kudu/util/threadpool.h:

http://gerrit.cloudera.org:8080/#/c/22614/3/src/kudu/util/threadpool.h@705
PS3, Line 705: GRACEFUL_QUIESCING -> QUIESCED
> GRACEFUL_QUIESCING -> QUIESCING is also a legal transition although will be
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
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-Comment-Date: Thu, 13 Mar 2025 02:12:56 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] introduce ThreadPoolToken::Close()

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22614 )

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
Reviewed-on: http://gerrit.cloudera.org:8080/22614
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 351 insertions(+), 28 deletions(-)

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

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 9
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)

[kudu-CR] WIP [util] introduce ThreadPoolToken::Close()

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

Change subject: WIP [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 1: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 12 Mar 2025 07:51:22 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22614/6/src/kudu/util/threadpool.cc
File src/kudu/util/threadpool.cc:

http://gerrit.cloudera.org:8080/#/c/22614/6/src/kudu/util/threadpool.cc@344
PS6, Line 344: CHECK_GT(active_threads_, 0)
> Does this check needs to be applied for GRACEFUL_QUIESCING state too?
Yes, we can add a check for GRACEFUL_QUESCING as well.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 6
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-Comment-Date: Fri, 14 Mar 2025 23:14:04 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 7: Code-Review+2


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 7
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-Comment-Date: Fri, 14 Mar 2025 23:25:27 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 5: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 5
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-Comment-Date: Thu, 13 Mar 2025 05:32:49 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 3: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 12 Mar 2025 23:07:21 +0000
Gerrit-HasComments: No

[kudu-CR] WIP [util] introduce ThreadPoolToken::Close()

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

Change subject: WIP [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 1:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 12 Mar 2025 06:44:21 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 6: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 6
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-Comment-Date: Fri, 14 Mar 2025 00:20:51 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 6: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22614/6/src/kudu/util/threadpool.cc
File src/kudu/util/threadpool.cc:

http://gerrit.cloudera.org:8080/#/c/22614/6/src/kudu/util/threadpool.cc@344
PS6, Line 344: CHECK_GT(active_threads_, 0)
Does this check needs to be applied for GRACEFUL_QUIESCING state too?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 6
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-Comment-Date: Fri, 14 Mar 2025 05:00:18 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

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

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

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 350 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/14/22614/6
-- 
To view, visit http://gerrit.cloudera.org:8080/22614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 6
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)

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

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

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

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 288 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/14/22614/4
-- 
To view, visit http://gerrit.cloudera.org:8080/22614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 8: Verified+1

Unrelated test failures:
  * DEBUG: partition_pruner-test
  * RELEASE: auto_rebalancer-test


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 8
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-Comment-Date: Tue, 18 Mar 2025 22:45:44 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 7: -Verified

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 7
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-Comment-Date: Tue, 18 Mar 2025 19:24:35 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 7: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 7
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-Comment-Date: Tue, 18 Mar 2025 20:15:21 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 7:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 7
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-Comment-Date: Fri, 14 Mar 2025 23:14:27 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

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

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

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 284 insertions(+), 26 deletions(-)


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22614/3/src/kudu/util/threadpool.h
File src/kudu/util/threadpool.h:

http://gerrit.cloudera.org:8080/#/c/22614/3/src/kudu/util/threadpool.h@705
PS3, Line 705: GRACEFUL_QUIESCING -> QUIESCED
GRACEFUL_QUIESCING -> QUIESCING is also a legal transition although will be QUIESCED momentarily. Does it make sense to add it here?



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 12 Mar 2025 23:47:43 +0000
Gerrit-HasComments: Yes

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 4: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 4
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-Comment-Date: Thu, 13 Mar 2025 03:13:04 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 4:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 4
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-Comment-Date: Thu, 13 Mar 2025 02:12:59 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 2: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 12 Mar 2025 21:20:20 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 3:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 12 Mar 2025 22:11:04 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 8:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 8
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-Comment-Date: Tue, 18 Mar 2025 20:30:09 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 8: Verified-1

Build Failed 

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 8
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-Comment-Date: Tue, 18 Mar 2025 22:24:18 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 8: Code-Review+2

carrying over Abhishek's +2 from PS7


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 8
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-Comment-Date: Tue, 18 Mar 2025 22:46:30 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/22614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 8
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)

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

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

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

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 351 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/14/22614/7
-- 
To view, visit http://gerrit.cloudera.org:8080/22614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 7
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)

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

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

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

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................

[util] introduce ThreadPoolToken::Close()

This patch introduces a means to protect a thread pool token from
submission of new tasks, while allowing all of its queued tasks to
complete before the token reaches terminal QUIESCED state.  That's the
main difference from ThreadPoolToken::Shutdown(), where all the token's
queued but not-yet-in-flight tasks are thrown out of the thread pool's
queue.  From this perspective, the newly introduced Close() method might
be considered as a graceful and asynchronous version of its Shutdown()
counterpart.

This patch also adds a few test scenarios to cover the crucial parts
of the newly introduced functionality.

Change-Id: Ic226319c191af666233ec735c1787389d051b039
---
M src/kudu/util/threadpool-test.cc
M src/kudu/util/threadpool.cc
M src/kudu/util/threadpool.h
3 files changed, 282 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/14/22614/2
-- 
To view, visit http://gerrit.cloudera.org:8080/22614
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 2:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 12 Mar 2025 19:57:13 +0000
Gerrit-HasComments: No

[kudu-CR] [util] introduce ThreadPoolToken::Close()

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

Change subject: [util] introduce ThreadPoolToken::Close()
......................................................................


Patch Set 5:

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


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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic226319c191af666233ec735c1787389d051b039
Gerrit-Change-Number: 22614
Gerrit-PatchSet: 5
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-Comment-Date: Thu, 13 Mar 2025 04:39:05 +0000
Gerrit-HasComments: No