impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-9612: Fix race condition in RuntimeFilter::WaitForArrival
Date Wed, 08 Apr 2020 18:07:14 GMT
Tim Armstrong has posted comments on this change. ( )

Change subject: IMPALA-9612: Fix race condition in RuntimeFilter::WaitForArrival

Patch Set 3:


Thanks for adding the test! We have also done things with "debug actions" that can be enabled
with end-to-end tests. E.g. see PUBLISH_FILTER_DELAY. But I think a unit test is better than
an end-to-end test for this.

I have a bunch of style comments but the tests and logic LGTM
File be/src/runtime/
PS3, Line 51: callWaitFor
nit: CallWaitFor() according to the style guide:

You can also remove the need for the void parameters if you use a C++ thread + lambda.
PS3, Line 52:   auto tc = (TestConfig*)vargp;
nit: we use c++-style casts. reinterpret_cast<TestConfig>(...) in this case.
PS3, Line 54: NULL
nit: nullptr
PS3, Line 82:   pthread_create(&t1, NULL, callWaitFor, (void*)&tc);
We use C++-style threads in the codebase which wrap pthreads and provide some niceties. E.g.
see BufferTransferConcurrent in for an example.

You can use C++ lambdas in conjunction with those, which I think means you can reduce this
to something like:

  threads.add_thread(new thread([&tc] {
PS3, Line 109: ahead
nit: a head

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7dffa626103ef0af06ad1e89231b0d2ee54bb94a
Gerrit-Change-Number: 15673
Gerrit-PatchSet: 3
Gerrit-Owner: Riza Suminto <>
Gerrit-Reviewer: Impala Public Jenkins <>
Gerrit-Reviewer: Riza Suminto <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Comment-Date: Wed, 08 Apr 2020 18:07:14 +0000
Gerrit-HasComments: Yes

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message