Skip to content

Replace deprecated verifier with new set of Verifiers#2505

Merged
xyuanlu merged 3 commits into
apache:masterfrom
desaikomal:fix-2485
May 27, 2023
Merged

Replace deprecated verifier with new set of Verifiers#2505
xyuanlu merged 3 commits into
apache:masterfrom
desaikomal:fix-2485

Conversation

@desaikomal

Copy link
Copy Markdown
Contributor

Issues

Description

  • Here are some details about my PR, including screenshots of any UI changes:
    While debugging the failure for the test case in DistributedController test case, realized we are using deprecated verifier. So let us first use the right verifier and see if it helps with resolving the temporary failures. These are all integration tests which depends on ZK timing and so not sure if just replacing correct verifier will help. But first order problem is to use right code.

Tests

  • [] The following tests are written for this issue:

(List the names of added unit/integration tests)

Changes that Break Backward Compatibility (Optional)

  • My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:

(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)

Documentation (Optional)

  • In case of new functionality, my PR adds documentation in the following wiki page:

(Link the GitHub wiki you added)

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)

result = verifier.verifyByZkCallback();
result = TestHelper.verify(() -> {
return verifier.verifyByZkCallback();
}, 100);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually 100, won't help much, the verify method does the following:

  1. Record startTime = currentTime
  2. Invoke verifier.verifyByZkCallback()
    2.1 Wait for max 30 seconds(default timeout) for the state to be verified
  3. If currentTime - startTime > 100 repeat 1.

So I think we need to have time out > (30 seconds + some buffer) if we want the verification to be retried. If we don't want the verification to be retried(which is the current implementation), then we need to use verifier.verifyByZkCallback(30seconds default timeout + 100 milliseconds) instead of verifier.verifyByZkCallback().

Apologies for the previous comment as I didn't read through the TestHelper.verify method code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think, i don't need it re=tried as earlier code just did sleep and moved on.
This is also the reason, I like to stick to the scope of the change to be what I set out with.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Still re-try is not required, can you please review it one final time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok. Lets stick to original one or use callback with timeout that has 30 seconds + 100 milliseconds set.

@desaikomal

desaikomal commented May 26, 2023

Copy link
Copy Markdown
Contributor Author

Thanks @qqu0127 and @parakhnr for review. This change has been approved by @parakhnr and @qqu0127. Ready to be merged.
Commit message: Replace the deprecated verifier with new set of verifiers.

@xyuanlu xyuanlu merged commit f2d19e6 into apache:master May 27, 2023
xyuanlu pushed a commit to xyuanlu/helix that referenced this pull request Jul 14, 2023
Replace the deprecated verifier with new set of verifiers.

---------

Co-authored-by: Komal Desai <kdesai@kdesai-mn1.linkedin.biz>
xyuanlu pushed a commit to xyuanlu/helix that referenced this pull request Jul 15, 2023
Replace the deprecated verifier with new set of verifiers.

---------

Co-authored-by: Komal Desai <kdesai@kdesai-mn1.linkedin.biz>
xyuanlu pushed a commit to xyuanlu/helix that referenced this pull request Jul 19, 2023
Replace the deprecated verifier with new set of verifiers.

---------

Co-authored-by: Komal Desai <kdesai@kdesai-mn1.linkedin.biz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestDistributedControllerManager is using Deprecated ClusterStateVerifier

4 participants