Skip to content

Make Engine.awaitPendingClose protected #130004

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2199,7 +2199,7 @@ public void close() throws IOException {
awaitPendingClose();
}

private void awaitPendingClose() {
protected final void awaitPendingClose() {
Copy link
Contributor

Choose a reason for hiding this comment

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

aren't we getting the closedLatch in the closeNoLock method parameter?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's helpful to describe how you're planning to use this method in the inheritors

Copy link
Member Author

Choose a reason for hiding this comment

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

aren't we getting the closedLatch in the closeNoLock method parameter?

Yes, but that one is final in InternalEngine

Maybe it's helpful to describe how you're planning to use this method in the inheritors

Exposing the method as package-protected in implementations, allowing its usage in tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

See the linked pull request for such an usage.

try {
closedLatch.await();
} catch (InterruptedException e) {
Expand Down