mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5984 - fix sync on get for access ordered LinkedHashMap
This commit is contained in:
parent
4a8fec4a66
commit
f6e1054a4b
|
@ -1116,11 +1116,11 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getLastProducerSequenceId(ProducerId id) {
|
public long getLastProducerSequenceId(ProducerId id) {
|
||||||
indexLock.readLock().lock();
|
indexLock.writeLock().lock();
|
||||||
try {
|
try {
|
||||||
return metadata.producerSequenceIdTracker.getLastSeqId(id);
|
return metadata.producerSequenceIdTracker.getLastSeqId(id);
|
||||||
} finally {
|
} finally {
|
||||||
indexLock.readLock().unlock();
|
indexLock.writeLock().unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue