kezhuw commented on a change in pull request #13124:
URL: https://github.com/apache/flink/pull/13124#discussion_r469223662
##########
File path:
flink-core/src/main/java/org/apache/flink/util/AbstractCloseableRegistry.java
##########
@@ -163,9 +163,9 @@ protected final void addCloseableInternal(Closeable
closeable, T metaData) {
/**
* Removes a mapping from the registry map, respecting locking.
*/
- protected final void removeCloseableInternal(Closeable closeable) {
+ protected final boolean removeCloseableInternal(Closeable closeable, T
object) {
synchronized (getSynchronizationLock()) {
- closeableToRef.remove(closeable);
+ return closeableToRef.remove(closeable, object);
Review comment:
@tillrohrmann OK. It is just a paranoid concern. I didn't observe this
behavior in local test, but if I spy containing registry to keep that phantom
reference from unreachable, it indeed close re-registered closeable. This
spying behavior will not happen in real code.
I have change the signature to `boolean removeCloseableInternal(Closeable
closeable)` in following fixup commit which should be squashed out before merge.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]