lifepuzzlefun commented on code in PR #20112:
URL: https://github.com/apache/pulsar/pull/20112#discussion_r1168347260


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/intercept/ManagedLedgerInterceptorImpl.java:
##########
@@ -122,14 +130,9 @@ public CompletableFuture<Void> 
onManagedLedgerLastLedgerInitialize(String name,
                             if (ledgerEntry != null) {
                                 BrokerEntryMetadata brokerEntryMetadata =
                                         
Commands.parseBrokerEntryMetadataIfExist(ledgerEntry.getEntryBuffer());
-                                for (BrokerEntryMetadataInterceptor 
interceptor : brokerEntryMetadataInterceptors) {
-                                    if (interceptor instanceof 
AppendIndexMetadataInterceptor) {
-                                        if (brokerEntryMetadata != null && 
brokerEntryMetadata.hasIndex()) {
-                                            ((AppendIndexMetadataInterceptor) 
interceptor)
-                                                    
.recoveryIndexGenerator(brokerEntryMetadata.getIndex());
-                                        }
-                                        break;
-                                    }
+                                if (brokerEntryMetadata != null) {

Review Comment:
   aha, nice suggestion! code changed.  : - )  



-- 
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