artnaseef commented on issue #1731:
URL: https://github.com/apache/activemq/issues/1731#issuecomment-4006464987
Looking at it again now, perhaps this code snippet should just be moved
after the critical section?
```
if (indexListener != null) {
indexListener.onAdd(new
IndexListener.MessageContext(context, message, new Runnable() {
@Override
public void run() {
// cursor add complete
synchronized (pendingAdditions) {
pendingAdditions.remove(sequence); }
}
}));
} else {
```
That's in `org.apache.activemq.store.jdbc.JDBCMessageStore#addMessage`.
I don'e see anything happening in that section of code that requires the
lock on `pendingAdditions` when it executes. Note that I'm not talking about
the callback inner `synchronized` - that part is fine.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact