You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/07/28 08:58:43 UTC

[GitHub] [zookeeper] maoling opened a new pull request #1024: ZOOKEEPER-3470:Flaky test: LearnerMetricsTest.testLearnerMetricsTest()

maoling opened a new pull request #1024: ZOOKEEPER-3470:Flaky test: LearnerMetricsTest.testLearnerMetricsTest()
URL: https://github.com/apache/zookeeper/pull/1024
 
 
   - From the logs, we can guess that this flaky test was caused from the observer is lagged behind the leader. we can inject the delay in the following codes:`Observer#processPacket` to reproduce this issue:
   ```
          case Leader.INFORM:
               **Thread.sleep(250);**
               ServerMetrics.getMetrics().LEARNER_COMMIT_RECEIVED_COUNT.add(1);
               TxnHeader hdr = new TxnHeader();
   ```
   - we may have no efficient way to have a hook to make sure that the create request has applied in all the participants successfully, but we can assert the size relation: the actual metric value is alway lessThanOrEqualTo the expected value because the delay between learns and leader. 
   - more details in the [ZOOKEEPER-3470](https://issues.apache.org/jira/browse/ZOOKEEPER-3470) 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services