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 e1270d25b40..cf03cf66292 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,7 @@ private void startNewBookieWithMultipleLedgerDirs(int numOfLedgerDirs) ServerConfiguration newConf = newServerConfiguration( PortManager.nextFreePort(), ledgerDirs[0], ledgerDirs); + newConf.setDiskCheckInterval(Integer.MAX_VALUE); startAndAddBookie(newConf); }