Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
repliToken can be 0.
In org.apache.activemq.artemis.core.replication.ReplicationManager#sendReplicatePacket(org.apache.activemq.artemis.core.protocol.core.Packet, boolean, org.apache.activemq.artemis.utils.ReusableLatch) the repliToken is initialized with the value returned by (line 464) OperationContextImpl.getContext(ioExecutorFactory), i.e.:
final OperationContext repliToken = OperationContextImpl.getContext(ioExecutorFactory);
Inside this method, a call is made to OperationContextImpl.threadLocalContext.get()(line 61), which returns the value from the thread that was set earlier. If no value was set in the stream, then token will be null.
OperationContext token = OperationContextImpl.threadLocalContext.get();
If ioExecutorFactory is null and there is no value set in the thread, then the repliToken will remain null because the backing getContext() method also returns null in this case.
So repliToken can be 0 if ioExecutorFactory is null and there is no value set in the thread.
Attachments
Issue Links
- links to