Skip to content

GEODE-4712 GEODE-5943: shut down the bucketSorter when destroying the partitioned region#2845

Merged
jinmeiliao merged 4 commits intoapache:developfrom
jinmeiliao:4712
Nov 15, 2018
Merged

GEODE-4712 GEODE-5943: shut down the bucketSorter when destroying the partitioned region#2845
jinmeiliao merged 4 commits intoapache:developfrom
jinmeiliao:4712

Conversation

@jinmeiliao
Copy link
Copy Markdown
Member

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.

Copy link
Copy Markdown
Contributor

@kirklund kirklund left a comment

Choose a reason for hiding this comment

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

It's not clear to me why it would be necessary to bounce VMs or what the underlying flakiness is. I think the underlying cause of flakiness should be found and addressed rather than just resorting to bouncing the VMs which seems overly heavy handed to me.

Copy link
Copy Markdown
Contributor

@kirklund kirklund left a comment

Choose a reason for hiding this comment

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

I think bouncing of VMs should be reserved for a very few special case tests involving forced disconnect or reconnect.

@jinmeiliao
Copy link
Copy Markdown
Member Author

@kirklund I talked to Eric about this. He thinks bouncing the VM should be the approach here. But I think there may be other ways as well. maybe we can pair on this to find a better approach. I know why this happened, but I am not sure what's the correct way to fix the flakiness.

@kirklund
Copy link
Copy Markdown
Contributor

Yesterday, Jinmei and I discovered that the JVM which goes critical and causes the failure has 12 GemFireCacheImpl instances in it. So this test seems to be hitting some sort of memory leak that needs to be fixed (not sure if it's a test or product leak).

…PartitionRegion to release the reference to cache.

* the bucketSorter thread is keeping the cache from being garbage collected after cache.close is called.
@jinmeiliao jinmeiliao changed the title GEODE-4712 GEODE-5943: bounce vm after each test to fix flaky test GEODE-4712 GEODE-5943: shut down the bucketSorter when destroying the partitioned region Nov 14, 2018
colocatedWithRegion.getColocatedByList().remove(this);
}

bucketSorter.shutdown();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Needs null check. Its created if the eviction is configured.

Copy link
Copy Markdown
Contributor

@dschneider-pivotal dschneider-pivotal left a comment

Choose a reason for hiding this comment

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

It would be great if you could add a unit test that showed the

&& this.getEvictionAttributes().getAlgorithm().isLRUHeap()) {
this.sortedBuckets = new ArrayList<BucketRegion>();
this.bucketSorter = LoggingExecutors.newScheduledThreadPool("BucketSorterThread", 1);
this.bucketSorter = LoggingExecutors.newScheduledThreadPool("BucketSorterRunnable", 1);
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.

This one should not be "BucketSorterRunnable". This is the thread name so the original "BucketSorterThread" was fine.

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.

I unit test would be great but not required.

Copy link
Copy Markdown
Member Author

@jinmeiliao jinmeiliao Nov 15, 2018

Choose a reason for hiding this comment

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

added an integration test and renamed the thread

@jinmeiliao jinmeiliao merged commit 3f4474c into apache:develop Nov 15, 2018
@jinmeiliao jinmeiliao deleted the 4712 branch November 15, 2018 20:48
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.

4 participants