dlg99 commented on a change in pull request #2936:
URL: https://github.com/apache/bookkeeper/pull/2936#discussion_r772839255



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java
##########
@@ -1013,4 +1077,91 @@ public void diskJustWritable(File disk) {
             }
         };
     }
+
+    @Override
+    public void setLimboState(long ledgerId) throws IOException {
+        if (log.isDebugEnabled()) {
+            log.debug("setLimboState. ledger: {}", ledgerId);
+        }
+        ledgerIndex.setLimbo(ledgerId);
+    }
+
+    @Override
+    public boolean hasLimboState(long ledgerId) throws IOException {
+        if (log.isDebugEnabled()) {
+            log.debug("hasLimboState. ledger: {}", ledgerId);
+        }
+        return ledgerIndex.get(ledgerId).getLimbo();
+    }
+
+    @Override
+    public void clearLimboState(long ledgerId) throws IOException {
+        if (log.isDebugEnabled()) {
+            log.debug("clearLimboState. ledger: {}", ledgerId);
+        }
+        ledgerIndex.clearLimbo(ledgerId);
+    }
+
+    private void throwIfLimbo(long ledgerId) throws IOException, 
BookieException {

Review comment:
       that's exactly what I wanted to avoid - some other subclassed exception 
thrown but handled the same because IDE generated catch for BookieException. 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to