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 (#22752)

(cherry picked from commit adad1fb)
  • Loading branch information
lhotari committed Nov 23, 2024
1 parent 2cacf06 commit f4fa5b9
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,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 f4fa5b9

Please # to comment.