Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #3045 remove stale compactions from coordinator #3059

Merged
merged 3 commits into from Nov 2, 2022

Conversation

keith-turner
Copy link
Contributor

I added a unit test and I ran all ITs that matched the pattern *Compaction*IT but have not tested the scenario in #3045 with these changes. The unit test shows it working in isolation, but not end to end.

@keith-turner keith-turner changed the base branch from main to 2.1 November 1, 2022 00:00
@ctubbsii ctubbsii added this to In progress in 2.1.1 via automation Nov 1, 2022
Copy link
Contributor

@dlmarion dlmarion left a comment

Choose a reason for hiding this comment

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

Looks good, but I wonder if we should put the cleanup in a background thread instead of on the request thread that the Monitor uses to get the data. I'm not sure that this is super-important, as I think the orphaned RUNNING entries happen in a small number of cases. But, if the Monitor is down or never used by the user, then no cleanup will happen.

@ctubbsii
Copy link
Member

ctubbsii commented Nov 1, 2022

Test seems to fail on JDK 17. Not sure what's going on with that.

@keith-turner
Copy link
Contributor Author

Looks good, but I wonder if we should put the cleanup in a background thread instead of on the request thread that the Monitor uses to get the data. I'm not sure that this is super-important, as I think the orphaned RUNNING entries happen in a small number of cases. But, if the Monitor is down or never used by the user, then no cleanup will happen.

When I first started looking into this I was considering adding this code to the DeadCompactionDetector because it already scans the metadata table and runs periodically in the background. I decided against this because I thought it may make the code harder to understand and would force these two task to run at the same cadence. I think I will take another look at making it run in the background as a task or as part of the dead compaction detector.

Test seems to fail on JDK 17. Not sure what's going on with that.

I saw that, going to look into it. Seemed to be failing to initialize the class, wonder if thats because I called System.nanoTime to initialize an instance var and maybe JDK 17 does not like that.

@keith-turner
Copy link
Contributor Author

Test seems to fail on JDK 17. Not sure what's going on with that.

I was able to reproduce this locally and fix it locally in commit 7249313. Was a problem with powermock, reflection, and java modules. Needed to add java.time which contained the Duration class that powermock was trying to modify.

@EdColeman EdColeman deleted the branch apache:2.1 November 1, 2022 17:53
@EdColeman EdColeman closed this Nov 1, 2022
2.1.1 automation moved this from In progress to Done Nov 1, 2022
@ctubbsii ctubbsii reopened this Nov 1, 2022
2.1.1 automation moved this from Done to In progress Nov 1, 2022
@ctubbsii ctubbsii linked an issue Nov 1, 2022 that may be closed by this pull request
@keith-turner
Copy link
Contributor Author

But, if the Monitor is down or never used by the user, then no cleanup will happen.

@dlmarion I modified the code to run periodically in the background. This could avoid an OOME in a long running coordinator process for that case you mentioned.

@keith-turner keith-turner merged commit 5e4e30b into apache:2.1 Nov 2, 2022
2.1.1 automation moved this from In progress to Done Nov 2, 2022
asfgit pushed a commit that referenced this pull request Nov 2, 2022
Fix resource leak warning introduced in #3059
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
2.1.1
Done
Development

Successfully merging this pull request may close these issues.

External Compaction stuck
4 participants