You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/07 12:04:34 UTC

[GitHub] [pulsar] eolivelli commented on a diff in pull request #17512: [fix][tiered-storage] Don't cleanup data when offload met Metastore exception

eolivelli commented on code in PR #17512:
URL: https://github.com/apache/pulsar/pull/17512#discussion_r964757669


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -3006,6 +3006,13 @@ private void offloadLoop(CompletableFuture<PositionImpl> promise, Queue<LedgerIn
                                     if (exception != null) {
                                         log.error("[{}] Failed to offload data for the ledgerId {}",
                                                 name, ledgerId, exception);
+                                        if (exception instanceof MetaStoreException) {
+                                            // When a MetaStore exception happens, we can not make sure the metadata
+                                            // update is failed or not. Because we have a retry on the connection loss,
+                                            // it is possible to get a BadVersion or other exception after retrying.
+                                            // So we don't clean up the data if it has metadata operation exception.

Review Comment:
   we must log a (ERROR) message, this way we can see this case in the logs



-- 
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: commits-unsubscribe@pulsar.apache.org

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