Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ public void removeDatabase(String dbName) {

// get journal db names and sort the names
public List<Long> getDatabaseNames() {
// The operation before may set the current thread as interrupted.
// MUST reset the interrupted flag of current thread to false,
// otherwise replicatedEnvironment.getDatabaseNames() will fail because it will call lock.tryLock(),
// which will check the interrupted flag.
Thread.interrupted();
List<Long> ret = new ArrayList<Long>();
List<String> names = null;
int tried = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ public synchronized long write(JournalBatch batch) throws IOException {

@Override
public synchronized long write(short op, Writable writable) throws IOException {
// The operation before may set the current thread as interrupted.
// MUST reset the interrupted flag of current thread to false,
// otherwise edit log writing may fail because it will call lock.tryLock(),
// which will check the interrupted flag.
Thread.interrupted();
JournalEntity entity = new JournalEntity();
entity.setOpCode(op);
entity.setData(writable);
Expand Down
Loading