File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
core/src/main/java/kafka/automq/zerozone Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,9 @@ private CompletableFuture<AutomqZoneRouterResponse> handleZoneRouterRequest0(Aut
117117 partitionProduceRequest .unpackLinkCf = routerChannel .get (channelOffset );
118118 unpackLinkQueue .add (partitionProduceRequest );
119119 partitionProduceRequest .unpackLinkCf .whenComplete ((rst , ex ) -> {
120- size .addAndGet (rst .readableBytes ());
120+ if (ex != null ) {
121+ size .addAndGet (rst .readableBytes ());
122+ }
121123 handleUnpackLink ();
122124 ZeroZoneMetricsManager .GET_CHANNEL_LATENCY .record (time .nanoseconds () - startNanos );
123125 });
@@ -191,7 +193,7 @@ private CompletableFuture<AutomqZoneRouterResponseData.Response> append0(
191193 CompletableFuture <AutomqZoneRouterResponseData .Response > cf = new CompletableFuture <>();
192194 RouterInProduceHandler handler = local ? localAppendHandler : routerInProduceHandler ;
193195 // We should release the request after append completed.
194- cf .whenComplete ((resp , ex ) -> zoneRouterProduceRequest . close ( ));
196+ cf .whenComplete ((resp , ex ) -> FutureUtil . suppress ( zoneRouterProduceRequest :: close , LOGGER ));
195197 handler .handleProduceAppend (
196198 ProduceRequestArgs .builder ()
197199 .clientId (buildClientId (realEntriesPerPartition ))
You can’t perform that action at this time.
0 commit comments