You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/12/16 10:12:13 UTC

[GitHub] [bookkeeper] kezhuw commented on a change in pull request #2944: Fix wrong ledger id parse radix for index relocation file in IndexPersistenceMgr

kezhuw commented on a change in pull request #2944:
URL: https://github.com/apache/bookkeeper/pull/2944#discussion_r770397152



##########
File path: 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;

Review comment:
       Seems that all access methods of `deleted` and `fc` are `synchronized`. So I think it is safe ?
   
   Actually, I could keep `deleted` untouched by using `lf.delete()` directly to delete file instead of `FileInfo.delete` which is used as spying point to mimic crashing behavior in tests. But, this way I have to introduce an extra spying point to intercept. Should I go this way and make spying point more explicitly ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org