diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java index 89f820b56d3..553d52f606e 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/FileInfo.java @@ -549,6 +549,7 @@ public synchronized void moveToNewLocation(File newFile, long size) throws IOExc } fc = new RandomAccessFile(newFile, mode).getChannel(); lf = newFile; + deleted = false; } public synchronized byte[] getMasterKey() throws IOException { diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ReadOnlyBookieTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ReadOnlyBookieTest.java index 8bfbd8e6d92..da51d96971c 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ReadOnlyBookieTest.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ReadOnlyBookieTest.java @@ -248,6 +248,8 @@ private void startNewBookieWithMultipleLedgerDirs(int numOfLedgerDirs) ServerConfiguration newConf = newServerConfiguration( PortManager.nextFreePort(), ledgerDirs[0], ledgerDirs); + + newConf.setDiskCheckInterval(Integer.MAX_VALUE); bsConfs.add(newConf); bs.add(startBookie(newConf)); }