liudezhi2098 commented on issue #13526: URL: https://github.com/apache/pulsar/issues/13526#issuecomment-1002889453
> > There is no need to add a background operation. We can do the deletion in the same thread, after the 'mark' phase. > > Otherwise we will introduce more complexity in understanding when the deletion happens (and you will see many new flaky tests for instance) > > @eolivelli We can delete after marking, but if the broker process happens to be restarted after the marking is completed, or the bookkeeper cluster is in an abnormal state when the ledger is deleting and the deletion cannot be completed normally, then this part of the ledger needs to be rechecked and deleted. If we do not start a background thread, do we have other ways to complete such a check? maybe we can accomplish this in internalTrimLedgers, if the broker process happens to be restarted after the marking is completed, can still find the deleteable ledgers, then need to rechecked and delete. -- 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]
