Skip to content

Fix test TestCustomizedViewAggregation#1302

Merged
huizhilu merged 2 commits intoapache:masterfrom
mgao0:metrics
Aug 25, 2020
Merged

Fix test TestCustomizedViewAggregation#1302
huizhilu merged 2 commits intoapache:masterfrom
mgao0:metrics

Conversation

@mgao0
Copy link
Contributor

@mgao0 mgao0 commented Aug 21, 2020

Issues

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

Fixed #1301

Description

  • Here are some details about my PR, including screenshots of any UI changes:

This is a temporary work around for the test failure until we have a design for fixing the root cause. Root cause for the failure is #1296.

Tests

  • The following tests are written for this issue:

(List the names of added unit/integration tests)

  • The following is the result of the "mvn test" command on the appropriate module:

Ran suite tests three times, this test didn't fail in any run.
[ERROR] Failures:
[ERROR] TestResourceChangeDetector.testResetSnapshots:431 » ThreadTimeout Method org.t...
[ERROR] TestZkConnectionLost.testLostZkConnection » ThreadTimeout Method org.testng.in...
[ERROR] TestAssignableInstanceManager.testGetAssignableInstanceMap:115 expected: but was:
[INFO]
[ERROR] Tests run: 1173, Failures: 3, Errors: 0, Skipped: 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:29 h
[INFO] Finished at: 2020-08-21T11:39:34-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)

@kaisun2000
Copy link
Contributor

What is the root cause?

@mgao0
Copy link
Contributor Author

mgao0 commented Aug 24, 2020

What is the root cause?

Please refer to this issue #1296 for the root cause.

Copy link
Contributor

@kaisun2000 kaisun2000 left a comment

Choose a reason for hiding this comment

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

From the description of #1296, I still don't quite understand what caused the issue.

So a finalize() from callback handler causing the routingTableProvider to reset and later update see empty snapshot.

So what caused the finalize? which path?

@mgao0
Copy link
Contributor Author

mgao0 commented Aug 24, 2020

From the description of #1296, I still don't quite understand what caused the issue.

So a finalize() from callback handler causing the routingTableProvider to reset and later update see empty snapshot.

So what caused the finalize? which path?

When we dropped a customized state type (TYPE_C for example), the associated customized view path and its children nodes for this customized state type is deleted, so the callback handler is finalized. An example for the path would be: /cluster_name/CUSTOMIZEDVIEW/TYPE_C, /cluster_name/CUSTOMIZEDVIEW/TYPE_C/resource_name

@kaisun2000
Copy link
Contributor

From the description of #1296, I still don't quite understand what caused the issue.
So a finalize() from callback handler causing the routingTableProvider to reset and later update see empty snapshot.
So what caused the finalize? which path?

When we dropped a customized state type (TYPE_C for example), the associated customized view path and its children nodes for this customized state type is deleted, so the callback handler is finalized. An example for the path would be: /cluster_name/CUSTOMIZEDVIEW/TYPE_C, /cluster_name/CUSTOMIZEDVIEW/TYPE_C/resource_name

So when customizedview deleting types would cause routingTableProvider listening on the type path to reset(). This is normal flow. But later usage of routingTableProvider would see empty snapshot which is also expected I guess. But in the code, see my comment in the code, where do the deletion happening?

Copy link
Contributor

@kaisun2000 kaisun2000 left a comment

Choose a reason for hiding this comment

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

This is a workaround for flaky test. If this one still get flaky. We can also consider disable it till the root cause is fixed,

@mgao0
Copy link
Contributor Author

mgao0 commented Aug 25, 2020

This PR is ready to be merged.
Final commit message: Fix test TestCustomizedViewAggregation.

@huizhilu huizhilu merged commit c0f6ed2 into apache:master Aug 25, 2020
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.

Fix test TestCustomizedViewAggregation

4 participants