jelmini commented on code in PR #760:
URL: https://github.com/apache/jackrabbit-oak/pull/760#discussion_r1049651644


##########
oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java:
##########
@@ -237,6 +237,28 @@ private static GarbageCollectionStrategy 
newGarbageCollectionStrategy() {
         log.debug("TAR files: {}", tarFiles);
     }
 
+    private void onLockStatusChanged(SegmentNodeStorePersistence.LockStatus 
lockStatus) {
+        switch (lockStatus) {
+            case LOST:
+                try {
+                    if (tarFiles != null) {
+                        tarFiles.close();

Review Comment:
   Right. Thanks for spotting this, @ahanikel !
   I suppose we should add an `unsafeShutdown()` method to `TarFiles`, 
`TarWriter` and `AbstractRemoteSegmentArchiveWriter`, so that we can shut them 
down without attempting any finalisation writes to the remote storage, which 
would anyway fail or corrupt the data.
   What do you think?



-- 
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: dev-unsubscr...@jackrabbit.apache.org

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

Reply via email to