lordcheng10 commented on PR #3329:
URL: https://github.com/apache/bookkeeper/pull/3329#issuecomment-1154664769
> @hangc0276 I found when syncThread do flush, there exists duplicate
`checkpointComplete` invoke.
>
> SyncThread flush:
>
> ```
> private void flush() {
> Checkpoint checkpoint = checkpointSource.newCheckpoint();
> try {
> ledgerStorage.flush();
> } catch (NoWritableLedgerDirException e) {
> log.error("No writeable ledger directories", e);
> dirsListener.allDisksFull(true);
> return;
> } catch (IOException e) {
> log.error("Exception flushing ledgers", e);
> return;
> }
>
> if (disableCheckpoint) {
> return;
> }
>
> log.info("Flush ledger storage at checkpoint {}.", checkpoint);
> try {
> checkpointSource.checkpointComplete(null, checkpoint, false);
> } catch (IOException e) {
> log.error("Exception marking checkpoint as complete", e);
> dirsListener.allDisksFull(true);
> }
> }
> ```
>
> ```
> @Override
> public void flush() throws IOException {
> Checkpoint cp = checkpointSource.newCheckpoint();
> checkpoint(cp);
> checkpointSource.checkpointComplete(ledgerDir, cp, true);
> }
> ```
I also think the checkpoint is duplicated 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]