Skip to content

Comments

Remove waiting on message deletion if current state is already updated#1068

Merged
jiajunwang merged 4 commits intoapache:masterfrom
zhangmeng916:master
Jun 23, 2020
Merged

Remove waiting on message deletion if current state is already updated#1068
jiajunwang merged 4 commits intoapache:masterfrom
zhangmeng916:master

Conversation

@zhangmeng916
Copy link
Contributor

@zhangmeng916 zhangmeng916 commented Jun 5, 2020

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

(#1067 )

Description

  • Here are some details about my PR, including screenshots of any UI changes:
    This PR remove the waiting on existing pending message if the message is already processed and current state has already been updated. This would help generate message earlier and increase the rate of P2P message.

Tests

  • The following tests are written for this issue:
    Two tests are heavily modified:
    TestP2PMessagesAvoidDuplicatedMessage
    TestP2PStateTransitionMessages

  • The following is the result of the "mvn test" command on the appropriate module:
    [INFO]
    [INFO] Results:
    [INFO]
    [ERROR] Failures:
    [ERROR] TestRebalancePipeline.testMsgTriggeredRebalance:203 expected: but was:
    [ERROR] TestJobQueueCleanUp.testJobQueueAutoCleanUp » ThreadTimeout Method org.testng....
    [ERROR] TestTaskNumAttempts.testTaskNumAttemptsWithDelay:76 expected:<2> but was:<1>
    [ERROR] TestTaskRebalancer.timeouts » ThreadTimeout Method org.testng.internal.TestNGM...
    [INFO]
    [ERROR] Tests run: 1145, Failures: 4, Errors: 0, Skipped: 1
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 01:27 h
    [INFO] Finished at: 2020-06-22T12:14:24-07:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project helix-core: There are test failures.
    [ERROR]

helix-rest
[INFO] Tests run: 162, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.34 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 162, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.589 s
[INFO] Finished at: 2020-06-09T19:12:40-07:00

Commits

  • My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

Copy link
Contributor

@junkaixue junkaixue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


double ratio = ((double) p2pTrigged) / ((double) total);
Assert.assertTrue(ratio > 0.6, String
Assert.assertTrue(ratio == 1, String
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, you can use Assert.assertEquals(p2pTrigged, total) now.

@zhangmeng916 zhangmeng916 force-pushed the master branch 2 times, most recently from 8f13526 to 076b74b Compare June 10, 2020 00:12
@zhangmeng916
Copy link
Contributor Author

This PR is ready to merge, approved by @dasahcc
Final commit message:
Remove the waiting logic in message generation phase on message deletion if current state is already updated. This will help increase the rate of P2P message during mastership handoff.

@jiajunwang jiajunwang merged commit d6d97c8 into apache:master Jun 23, 2020
huizhilu pushed a commit to huizhilu/helix that referenced this pull request Aug 16, 2020
apache#1068)

Remove the waiting logic in message generation phase on message deletion if current state is already updated. This will help increase the rate of P2P message during mastership handoff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants