Skip to content

Threadleak check#1

Open
kaisun2000 wants to merge 131 commits into
masterfrom
threadleak_check
Open

Threadleak check#1
kaisun2000 wants to merge 131 commits into
masterfrom
threadleak_check

Conversation

@kaisun2000

Copy link
Copy Markdown
Owner

Issues

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

(apache#200 - Link your issue number here: You can write "Fixes #XXX". Please use the proper keyword so that the issue gets closed automatically. See https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue
Any of the following keywords can be used: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved)

Description

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

(Write a concise description including what, why, how)

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:

(Before CI test pass, please copy & paste the result of "mvn test")

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)

narendly and others added 15 commits November 17, 2020 11:47
It was discovered that even though there was a routing data change, _byteArrayZkClient was not being created anew using the newly read routing data. This would cause issues with the zookeeper endpoints provided through Helix REST. This change cleans up some internal methods and ensures that the byte array zk client gets nullified every time there is routing data change.

More specifically, the code was closing byteArrayDataAccessor but not byteArrayZkClient. This meant that the same byteArrayZkClient would be used even though everything was reset and routing data was updated. Hence, the data accessor was not really being created from scratch. This change makes sure that the underlying byteArrayZkClient gets closed and nullified upon routing data change.
…ache#1533)

Stabilizing several tests by giving a starting up waiting periods up-on constructing BestPossibleExternalViewVerifier.

Co-authored-by: Kai Sun <ksun@ksun-mn1.linkedin.biz>
Fix TestHelixAdminCli testDeactivateCluster flakiness. As this test does not wait till the cluster converge before tearing it down. The tearing down process can have exceptions depending on timing.

Co-authored-by: Kai Sun <ksun@ksun-mn1.linkedin.biz>
…pache#1536)

Fix two flaky tests. TestHelixZkClient may fail if there is session changes. TestClusterStatusMonitorLifecycle may fail if the asyn thread pool tearning down is slow (asyncly). Both happen rarely but do happen.

Co-authored-by: Kai Sun <ksun@ksun-mn1.linkedin.biz>
…pache#1538)

TestRoutingDataCache can be flaky if entering the test the cluster is not in a stable state. We fix it by wait till the cluster is stable.

Co-authored-by: Kai Sun <ksun@ksun-mn1.linkedin.biz>
Fixed bug apache#1516: Tutorial doc page leads to compilation and execution errors.

Co-authored-by: Bruno Freudensprung <bruno.freudensprung@kairntech.com>
Fix several tests with resource leakage.

Co-authored-by: Kai Sun <ksun@ksun-mn1.linkedin.biz>
Recently unit test can not complete due to threads leaking
and ZK session leaking. We identified the leaks and fixed
them. In order for future test not to leak resources, we
need a way to enforce test class would release/clean up resource created during test.

A check is implemented in @afterclass in ZkTestBase.java.
thus we can attribute the thread leakage accordingly

2/ fix thread leakage in apache#1247, apache#1246, apache#1245, apache#1244, apache#1241, apache#1240
…iled.

TestRoutingTableProviderPeriodicRefresh is still flaky. Totally depends
on timing.
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