Skip to content

Conversation

@gaoran10
Copy link
Collaborator

@gaoran10 gaoran10 commented Jun 5, 2024

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?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@gaoran10 gaoran10 requested a review from codelipenghui as a code owner June 5, 2024 14:35
@gaoran10 gaoran10 self-assigned this Jun 5, 2024
@github-actions github-actions bot added the no-need-doc This pr does not need any document label Jun 5, 2024
this.readMoreEntries();
}
}, routeExecutor);
entry.getRight().release();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the key point, we should release the entry directly.

propsList.add(Pair.of(entry.getPosition(), props));
topic.getDispatchRateLimiter().ifPresent(
limiter -> limiter.consumeDispatchQuota(1, entry.getLength()));
entry.release();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release the entry after collecting route information.

codelipenghui
codelipenghui previously approved these changes Jun 6, 2024
@codelipenghui codelipenghui merged commit 4940c75 into streamnative:master Jun 6, 2024
gaoran10 added a commit to gaoran10/aop that referenced this pull request Jun 6, 2024
gaoran10 added a commit to gaoran10/aop that referenced this pull request Jun 6, 2024
gaoran10 added a commit to gaoran10/aop that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants