-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Make Engine.awaitPendingClose protected #130004
Conversation
So that the method can be used by classes implementing the Engine abstract class.
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
@@ -2199,7 +2199,7 @@ public void close() throws IOException { | |||
awaitPendingClose(); | |||
} | |||
|
|||
private void awaitPendingClose() { | |||
protected final void awaitPendingClose() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
So that the method can be used by classes implementing the Engine abstract class.