Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feedTask not getting garbage collected #178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patrickghannage
Copy link
Contributor

When no append requests are happening on a certain partition, feed contexts may accumulate on the real time feed task queue of that partition server in case of a disconnection between a Waltz client and the server holding that partition.

@hrdlotom hrdlotom self-requested a review April 3, 2023 14:45
int hwmCompare = Long.compare(o1.highWaterMark, o2.highWaterMark);

if (hwmCompare == 0) {
return Integer.compare(o1.reqId.seqNum(), o2.reqId.seqNum());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's say we have FeedContexts of equal HWM. The first feed context is still going to block the queue while waiting for a new transaction. At this point the FeedContext becomes inactive but is still blocking the queue that may be dangerously grow. This doesn't critically influence the functionality of Waltz as with new transaction old expired FeedContexts are all erased and active FeedContexts are served.

Partition.FeedTask.process:

if (highWaterMark < nextTransactionId) {
     // Wait for more data or new feed context
    feedSync.await(version);
}```

@hrdlotom hrdlotom self-requested a review April 3, 2023 17:12
Copy link
Collaborator

@hrdlotom hrdlotom left a comment

Choose a reason for hiding this comment

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

LGTM. Expired feed contexts will be poped out when new feed context is inserted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants