Skip to content

Commit

Permalink
ARTEMIS-2603 Deadlock between pageStore.getCurrentID and page.cleanup
Browse files Browse the repository at this point in the history
This happened when JournalStorageManager.startReplication and PageStore.cleanup were called between multiple threads.
  • Loading branch information
clebertsuconic committed Jan 17, 2020
1 parent 02cc2b5 commit 1a6c4e5
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -1169,7 +1169,7 @@ public boolean isRejectingMessages() {

@Override
public Collection<Integer> getCurrentIds() throws Exception {
lock.writeLock().lock();
lock.readLock().lock();
try {
List<Integer> ids = new ArrayList<>();
SequentialFileFactory factory = fileFactory;
Expand All @@ -1180,7 +1180,7 @@ public Collection<Integer> getCurrentIds() throws Exception {
}
return ids;
} finally {
lock.writeLock().unlock();
lock.readLock().unlock();
}
}

Expand Down

0 comments on commit 1a6c4e5

Please sign in to comment.