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)

(cherry picked from commit 18db799)
  • Loading branch information
lhotari authored and srinath-ctds committed Jun 7, 2024
1 parent bf9cdeb commit 49902fe
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,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 49902fe

Please sign in to comment.