You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Joe McDonnell (Code Review)" <ge...@cloudera.org> on 2022/02/08 02:37:09 UTC

[Impala-ASF-CR] IMPALA-10989: fix race for result set metadata

Joe McDonnell has uploaded this change for review. ( http://gerrit.cloudera.org:8080/18212


Change subject: IMPALA-10989: fix race for result set metadata
......................................................................

IMPALA-10989: fix race for result set metadata

TSAN tests uncovered a race condition between the
thread reading the result set metadata in
ImpalaServer::GetResultSetMetadata() and the
thread setting the result set metadata in
ClientRequestState::SetResultSet() from
ClientRequestState::ExecDdlRequestImpl().
This is introduced by IMPALA-10811, which runs
ExecDdlRequestImpl in an async thread that
can now race with the client thread.

GetResultSetMetadata() holds ClientRequestState's
lock_ while reading the result set metadata, so
the fix is to hold this lock when writing the
result set metadata.

Testing:
 - Ran TSAN core job

Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
---
M be/src/service/client-request-state.cc
1 file changed, 6 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/12/18212/1
-- 
To view, visit http://gerrit.cloudera.org:8080/18212
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
Gerrit-Change-Number: 18212
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>

[Impala-ASF-CR] IMPALA-10989: fix race for result set metadata

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

Change subject: IMPALA-10989: fix race for result set metadata
......................................................................


Patch Set 1: Verified+1


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
Gerrit-Change-Number: 18212
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 08 Feb 2022 09:11:20 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10989: fix race for result set metadata

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

Change subject: IMPALA-10989: fix race for result set metadata
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/10114/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
Gerrit-Change-Number: 18212
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 08 Feb 2022 03:01:35 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10989: fix race for result set metadata

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

Change subject: IMPALA-10989: fix race for result set metadata
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/7816/ DRY_RUN=true


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
Gerrit-Change-Number: 18212
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Tue, 08 Feb 2022 02:38:17 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10989: fix race for result set metadata

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

Change subject: IMPALA-10989: fix race for result set metadata
......................................................................


Patch Set 1: Code-Review+2

Thanks for fixing this!


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
Gerrit-Change-Number: 18212
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Qifan Chen <qc...@cloudera.com>
Gerrit-Comment-Date: Wed, 09 Feb 2022 17:48:35 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-10989: fix race for result set metadata

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

Change subject: IMPALA-10989: fix race for result set metadata
......................................................................

IMPALA-10989: fix race for result set metadata

TSAN tests uncovered a race condition between the
thread reading the result set metadata in
ImpalaServer::GetResultSetMetadata() and the
thread setting the result set metadata in
ClientRequestState::SetResultSet() from
ClientRequestState::ExecDdlRequestImpl().
This is introduced by IMPALA-10811, which runs
ExecDdlRequestImpl in an async thread that
can now race with the client thread.

GetResultSetMetadata() holds ClientRequestState's
lock_ while reading the result set metadata, so
the fix is to hold this lock when writing the
result set metadata.

Testing:
 - Ran TSAN core job

Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
Reviewed-on: http://gerrit.cloudera.org:8080/18212
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Csaba Ringhofer <cs...@cloudera.com>
---
M be/src/service/client-request-state.cc
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Csaba Ringhofer: Looks good to me, approved

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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0833ed20d62474c434fa94bbbf8cd8ea99a7cf4
Gerrit-Change-Number: 18212
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Qifan Chen <qc...@cloudera.com>