ARTEMIS-2603 Deadlock between pageStore.getCurrentID and page.cleanup
This happened when JournalStorageManager.startReplication and PageStore.cleanup were called between multiple threads.
This commit is contained in:
parent
02cc2b5957
commit
1a6c4e5c62
|
@ -1169,7 +1169,7 @@ public class PagingStoreImpl implements PagingStore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Integer> getCurrentIds() throws Exception {
|
public Collection<Integer> getCurrentIds() throws Exception {
|
||||||
lock.writeLock().lock();
|
lock.readLock().lock();
|
||||||
try {
|
try {
|
||||||
List<Integer> ids = new ArrayList<>();
|
List<Integer> ids = new ArrayList<>();
|
||||||
SequentialFileFactory factory = fileFactory;
|
SequentialFileFactory factory = fileFactory;
|
||||||
|
@ -1180,7 +1180,7 @@ public class PagingStoreImpl implements PagingStore {
|
||||||
}
|
}
|
||||||
return ids;
|
return ids;
|
||||||
} finally {
|
} finally {
|
||||||
lock.writeLock().unlock();
|
lock.readLock().unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue