streamnative / aop

AMQP on Pulsar protocol handler
Apache License 2.0
114 stars 47 forks source link

[fix] Release `EntryImpl` while reading exchange topic #1256

Closed gaoran10 closed 4 months ago

gaoran10 commented 4 months ago

Motivation

The PR introduced the InflightReadsLimiter, the exchange replicator will read data and route index data to the queue topic, but it doesn't release the EntryImpl object, this will cause the broker in-flight read cache limiter to be exhausted.

Modifications

Release EntryImpl object while reading the exchange topic. Use topic dispatch limiter to control read batch size.

Verifying this change

Add test to verify the in-flight read cache can't be exhausted.

Does this pull request potentially affect one of the following parts:

Documentation

Check the box below.

Need to update docs?