[ 
https://issues.apache.org/jira/browse/IMPALA-11568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818116#comment-17818116
 ] 

ASF subversion and git services commented on IMPALA-11568:
----------------------------------------------------------

Commit 085b1806da6a1941200288a2f9a243e389e10820 in impala's branch 
refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=085b1806d ]

IMPALA-11568: Fix SamplingTimeSeriesCounter not correctly cleared

TimeSeriesCounters are scheduled in PeriodicCounterUpdater at the time
when they are added. TimeSeriesCounterToJsonTest stops and clears them
to avoid the update thread interfere with the rest of the test. However,
the samples in SamplingTimeSeriesCounter are not cleared since it
doesn't implement the Clear() method of TimeSeriesCounter. This leads to
non-determined results depend on when the counter is stopped.

This patch adds a Reset() method for SamplingTimeSeriesCounter to clear
the samples. It's only used in the test. A Reset() method in
StreamingSampler is also added for this purpose.

Test:
 - Ran TimeSeriesCounterToJsonTest 100 times. It used to fail in 10 runs.

Change-Id: I8bc2c94ad96899522b288708fcaf7413d4b99fa1
Reviewed-on: http://gerrit.cloudera.org:8080/21001
Reviewed-by: Riza Suminto <riza.sumi...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>


> Backend test TimeSeriesCounterToJsonTest in runtime-profile-test is flaky
> -------------------------------------------------------------------------
>
>                 Key: IMPALA-11568
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11568
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 4.2.0
>            Reporter: Laszlo Gaal
>            Assignee: Quanlong Huang
>            Priority: Blocker
>
> Console log:
> {code}
> [ RUN      ] ToJson.TimeSeriesCounterToJsonTest
> /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/util/runtime-profile-test.cc:1862:
>  Failure
> Value of: "0,2,4,6"
>   Actual: "0,2,4,6"
> Expected: a substring of 
> doc["contents"]["time_series_counters"][0]["data"].GetString()
> Which is: 
> "0,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77"
> /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/util/runtime-profile-test.cc:1865:
>  Failure
> Value of: "72,74,76,78"
>   Actual: "72,74,76,78"
> Expected: a substring of 
> doc["contents"]["time_series_counters"][0]["data"].GetString()
> Which is: 
> "0,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77"
> [  FAILED  ] ToJson.TimeSeriesCounterToJsonTest (1000 ms)
> {code}
> The failed git hash is {{d74d6994cc25ed2090886d6b406cf477a6ccf6b4}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to