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/11/20 01:10:46 UTC
[kudu-CR] [rpc,util] thread --> thread local
Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23696
Change subject: [rpc,util] __thread --> thread_local
......................................................................
[rpc,util] __thread --> thread_local
This patch changes '__thread' GCC-specific extension to the C++11-based
'thread_local' for better portability. At supported platforms, Kudu
de facto compiles with GCC/G++ and CLANG only (both support '__thread'
and treat it the same as 'thread_local'), but it doesn't hurt to have
more portable code.
I also fixed typo in service_queue.h and changed include guards
to 'pragma once' in threadlocal.h and striped64.h.
There are no functional modifications in this changelist.
Change-Id: I237f707f2a8755796ad14effeef007c670641643
---
M src/kudu/rpc/sasl_common.cc
M src/kudu/rpc/service_queue.h
M src/kudu/util/debug/trace_event_impl.cc
M src/kudu/util/debug/trace_event_impl.h
M src/kudu/util/debug/unwind_safeness.cc
M src/kudu/util/env_posix.cc
M src/kudu/util/kernel_stack_watchdog.cc
M src/kudu/util/logging.cc
M src/kudu/util/logging.h
M src/kudu/util/spinlock_profiling.cc
M src/kudu/util/striped64.cc
M src/kudu/util/striped64.h
M src/kudu/util/thread.cc
M src/kudu/util/thread.h
M src/kudu/util/threadlocal.h
M src/kudu/util/threadlocal_cache.h
M src/kudu/util/trace.cc
M src/kudu/util/trace.h
18 files changed, 34 insertions(+), 40 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/96/23696/1
--
To view, visit http://gerrit.cloudera.org:8080/23696
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I237f707f2a8755796ad14effeef007c670641643
Gerrit-Change-Number: 23696
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
[kudu-CR] [rpc,util] thread --> thread local
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23696 )
Change subject: [rpc,util] __thread --> thread_local
......................................................................
Patch Set 1:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2146/
--
To view, visit http://gerrit.cloudera.org:8080/23696
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I237f707f2a8755796ad14effeef007c670641643
Gerrit-Change-Number: 23696
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 20 Nov 2025 01:10:54 +0000
Gerrit-HasComments: No
[kudu-CR] [rpc,util] thread --> thread local
Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/23696 )
Change subject: [rpc,util] __thread --> thread_local
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/23696
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I237f707f2a8755796ad14effeef007c670641643
Gerrit-Change-Number: 23696
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 20 Nov 2025 19:26:31 +0000
Gerrit-HasComments: No
[kudu-CR] [rpc,util] thread --> thread local
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has posted comments on this change. ( http://gerrit.cloudera.org:8080/23696 )
Change subject: [rpc,util] __thread --> thread_local
......................................................................
Patch Set 1: Code-Review+1
Thanks for taking care of this!
--
To view, visit http://gerrit.cloudera.org:8080/23696
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I237f707f2a8755796ad14effeef007c670641643
Gerrit-Change-Number: 23696
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 20 Nov 2025 08:57:33 +0000
Gerrit-HasComments: No
[kudu-CR] [rpc,util] thread --> thread local
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23696 )
Change subject: [rpc,util] __thread --> thread_local
......................................................................
[rpc,util] __thread --> thread_local
This patch changes '__thread' GCC-specific extension to the C++11-based
'thread_local' for better portability. At supported platforms, Kudu
de facto compiles with GCC/G++ and CLANG only (both support '__thread'
and treat it the same as 'thread_local'), but it doesn't hurt to have
more portable code.
I also fixed typo in service_queue.h and changed include guards
to 'pragma once' in threadlocal.h and striped64.h.
There are no functional modifications in this changelist.
Change-Id: I237f707f2a8755796ad14effeef007c670641643
Reviewed-on: http://gerrit.cloudera.org:8080/23696
Tested-by: Kudu Jenkins
Reviewed-by: Ashwani Raina <ar...@gmail.com>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
---
M src/kudu/rpc/sasl_common.cc
M src/kudu/rpc/service_queue.h
M src/kudu/util/debug/trace_event_impl.cc
M src/kudu/util/debug/trace_event_impl.h
M src/kudu/util/debug/unwind_safeness.cc
M src/kudu/util/env_posix.cc
M src/kudu/util/kernel_stack_watchdog.cc
M src/kudu/util/logging.cc
M src/kudu/util/logging.h
M src/kudu/util/spinlock_profiling.cc
M src/kudu/util/striped64.cc
M src/kudu/util/striped64.h
M src/kudu/util/thread.cc
M src/kudu/util/thread.h
M src/kudu/util/threadlocal.h
M src/kudu/util/threadlocal_cache.h
M src/kudu/util/trace.cc
M src/kudu/util/trace.h
18 files changed, 34 insertions(+), 40 deletions(-)
Approvals:
Kudu Jenkins: Verified
Ashwani Raina: Looks good to me, but someone else must approve
Abhishek Chennaka: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/23696
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I237f707f2a8755796ad14effeef007c670641643
Gerrit-Change-Number: 23696
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: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
[kudu-CR] [rpc,util] thread --> thread local
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23696 )
Change subject: [rpc,util] __thread --> thread_local
......................................................................
Patch Set 1: Verified+1
Build Successful
http://jenkins.kudu.apache.org/job/pre_commit/2146/ : SUCCESS
--
To view, visit http://gerrit.cloudera.org:8080/23696
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I237f707f2a8755796ad14effeef007c670641643
Gerrit-Change-Number: 23696
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 20 Nov 2025 02:46:19 +0000
Gerrit-HasComments: No