nizhikov commented on code in PR #13765:
URL: https://github.com/apache/ignite/pull/13765#discussion_r4415395115
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/service/ClientServiceInvokeRequest.java:
##########
@@ -199,6 +202,34 @@ public ClientServiceInvokeRequest(BinaryReaderEx reader,
ClientProtocolContext p
catch (Throwable e) {
throw new IgniteException(e);
}
+ finally {
+ releaseLeftExplicitLocks(ctx);
+ }
+ }
+
+ /**
+ * Releases explicit locks acquired but not released by the service method
invoked locally (a service deployed
+ * on the local node is invoked in the client connector thread). Locks are
bound to the thread, so locks left
+ * unreleased would be inherited by the next request processed by the
thread. The client connector thread can't
+ * acquire explicit locks outside of service invocations, so all locks
held by the thread are released.
+ *
+ * @param ctx Connection context.
+ */
+ private void releaseLeftExplicitLocks(ClientConnectionContext ctx) {
+ try {
+ Collection<GridCacheVersion> released =
ctx.kernalContext().cache().context().mvcc()
Review Comment:
`mvcc()` will return `null` here on node stop.
Can we check this here.
--
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]