ibessonov commented on code in PR #7870:
URL: https://github.com/apache/ignite-3/pull/7870#discussion_r2993137135
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/RemotelyTriggeredResourceRegistry.java:
##########
@@ -148,6 +148,11 @@ public void close(UUID contextId) throws
ResourceCloseException {
public void closeByRemoteHostId(UUID remoteHostId) {
Set<FullyQualifiedResourceId> resourceIds =
remoteHostsToResources.get(remoteHostId);
+ if (resourceIds == null) {
+ // Remote host resources were already closed, likely by a
concurrent call of "removeRemoteHostResource" method.
Review Comment:
I guess we have to address the issue of concurrent `close` calls separately,
if that's what you mean (the code in
`RemotelyTriggeredResourceRegistry#close(FullyQualifiedResourceId)` that does
`get, close, remove`, which is prone to data races).
The `null` here implies that another thread has already called
`removeRemoteHostResource`, and that call _always_ comes after the actual
`resource.close()` call.
Does this answer your question?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]