[GitHub] [pulsar] merlimat commented on a change in pull request #5322: Fix bk write failure part 2
merlimat commented on a change in pull request #5322: Fix bk write failure part 2 URL: https://github.com/apache/pulsar/pull/5322#discussion_r332197883 ## File path: managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerErrorsTest.java ## @@ -329,40 +329,6 @@ public void addComplete(Position position, Object ctx) { latch.await(); } -@Test -public void recoverAfterWriteError() throws Exception { Review comment: Got it . 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] merlimat commented on a change in pull request #5322: Fix bk write failure part 2
merlimat commented on a change in pull request #5322: Fix bk write failure part 2 URL: https://github.com/apache/pulsar/pull/5322#discussion_r332197410 ## File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java ## @@ -624,6 +617,12 @@ private synchronized void internalAsyncAddEntry(OpAddEntry addOperation) { } } +@Override +public void readyToCreateNewLedger() { + // only set transition state to ClosedLedger if current state is WriteFailed + STATE_UPDATER.compareAndSet(this, State.WriteFailed, State.ClosedLedger); Review comment: ```suggestion if (STATE_UPDATER.compareAndSet(this, State.WriteFailed, State.ClosedLedger)) { log.info("[{}] Managed ledger is now ready to accept writes again", name); } ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] merlimat commented on a change in pull request #5322: Fix bk write failure part 2
merlimat commented on a change in pull request #5322: Fix bk write failure part 2 URL: https://github.com/apache/pulsar/pull/5322#discussion_r331767054 ## File path: managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerErrorsTest.java ## @@ -329,40 +329,6 @@ public void addComplete(Position position, Object ctx) { latch.await(); } -@Test -public void recoverAfterWriteError() throws Exception { Review comment: Sure, I was meaning to convert this test to use the `readyToCreateNewLedger()`, so that we cover the basic (mocked) test here 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [pulsar] merlimat commented on a change in pull request #5322: Fix bk write failure part 2
merlimat commented on a change in pull request #5322: Fix bk write failure part 2 URL: https://github.com/apache/pulsar/pull/5322#discussion_r331731580 ## File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java ## @@ -580,14 +585,6 @@ private synchronized void internalAsyncAddEntry(OpAddEntry addOperation) { log.debug("[{}] Queue addEntry request", name); } } else if (state == State.ClosedLedger) { -long now = clock.millis(); -if (now < lastLedgerCreationFailureTimestamp + WaitTimeAfterLedgerCreationFailureMs) { Review comment: `WaitTimeAfterLedgerCreationFailureMs` can be removed as a constant 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services