brusdev commented on code in PR #4526:
URL: https://github.com/apache/activemq-artemis/pull/4526#discussion_r1245062445
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java:
##########
@@ -415,4 +449,27 @@ public String toString() {
executorsPendingField +
"]";
}
+
+ @Override
+ public void clear() {
+ stored = 0;
+ storeLineUpField = 0;
+ minimalReplicated = 0;
+ replicated = 0;
+ replicationLineUpField = 0;
+ paged = 0;
+ minimalPage = 0;
+ pageLineUpField = 0;
+ errorCode = -1;
+ errorMessage = null;
+ executorsPendingField = 0;
+
+ if (tasks != null) {
+ tasks.clear();
+ }
+
+ if (storeOnlyTasks != null) {
+ storeOnlyTasks.clear();
+ }
Review Comment:
@gemmellr yes this could potentially be a concurrent operation and it could
cause inconsistent state. I could change it to be thread-safe but I'm not sure
this is necessary. I mean this method should be the last chance to close a
stuck session and it is supposed to be manually called by a user. If the call
is successful the context/session will be closed otherwise users could retry.
--
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]