You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2020/07/05 21:48:30 UTC

[impala] branch master updated: IMPALA-9916: Fix DiskIoMgrTest.MetricsOfWriteIoError failed due to data race in TSAN build

This is an automated email from the ASF dual-hosted git repository.

tarmstrong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 49af396  IMPALA-9916: Fix DiskIoMgrTest.MetricsOfWriteIoError failed due to data race in TSAN build
49af396 is described below

commit 49af396c1057ad8d3cd073cfe87d002c1dbae2fe
Author: Yida Wu <wy...@gmail.com>
AuthorDate: Sat Jul 4 08:31:02 2020 -0700

    IMPALA-9916: Fix DiskIoMgrTest.MetricsOfWriteIoError failed
    due to data race in TSAN build
    
    A mutex has been added to fix the data race issue during the
    unit test.
    
    Testing:
    Reran the unit test DiskIoMgrTest.MetricsOfWriteIoError under
    TSAN.
    
    Change-Id: If07a520001f397e49a77abcac6a86595cbf16a6c
    Reviewed-on: http://gerrit.cloudera.org:8080/16142
    Reviewed-by: Tim Armstrong <ta...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 be/src/runtime/io/disk-io-mgr-test.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/be/src/runtime/io/disk-io-mgr-test.cc b/be/src/runtime/io/disk-io-mgr-test.cc
index 87eea08..c471256 100644
--- a/be/src/runtime/io/disk-io-mgr-test.cc
+++ b/be/src/runtime/io/disk-io-mgr-test.cc
@@ -1754,6 +1754,7 @@ TEST_F(DiskIoMgrTest, MetricsOfWriteIoError) {
   WriteRange** new_range = tmp_pool.Add(new WriteRange*);
   WriteRange::WriteDoneCallback callback = [=](const Status& status) {
     ASSERT_EQ(TErrorCode::DISK_IO_ERROR, status.code());
+    lock_guard<mutex> l(written_mutex_);
     num_ranges_written_ = 1;
     writes_done_.NotifyOne();
   };