Skip to content

Commit

Permalink
[improve][broker] Clear thread local BrokerEntryMetadata instance bef…
Browse files Browse the repository at this point in the history
…ore reuse (apache#22752)
  • Loading branch information
lhotari authored May 22, 2024
1 parent ce99986 commit adad1fb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,7 @@ public static ByteBuf addBrokerEntryMetadata(ByteBuf headerAndPayload,
// | 2 bytes | 4 bytes | BROKER_ENTRY_METADATA_SIZE bytes |

BrokerEntryMetadata brokerEntryMetadata = BROKER_ENTRY_METADATA.get();
brokerEntryMetadata.clear();
for (BrokerEntryMetadataInterceptor interceptor : brokerInterceptors) {
interceptor.intercept(brokerEntryMetadata);
if (numberOfMessages >= 0) {
Expand Down

0 comments on commit adad1fb

Please sign in to comment.