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

[#222] Fix test infra error of not consuming records #223

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

vaibhav-yb
Copy link
Collaborator

After recent changes where we migrated all the test infra to use explicit checkpointing, it was observed that in the infra was returning inconsistent consumed records intermittently.

Upon investigation, it was discovered that the queue we are using to hold the records can only hold certain number of records at a time which was the culprit. This PR adds a fix by removing the upper limit on the count of records.

Additionally, this closes #222

@vaibhav-yb vaibhav-yb added the bug Something isn't working label Jun 1, 2023
@vaibhav-yb vaibhav-yb requested a review from vrajat June 1, 2023 08:36
@vaibhav-yb vaibhav-yb self-assigned this Jun 1, 2023
Copy link
Contributor

@vrajat vrajat left a comment

Choose a reason for hiding this comment

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

One minor comment. LG in general

@@ -194,7 +182,12 @@ public void taskStarted() {

protected int consumeAvailableRecords(Consumer<SourceRecord> recordConsumer) {
List<SourceRecord> records = new LinkedList<>();
consumedLines.drainTo(records);

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Do you need to copy the records to another list? Can consumedLines be used directly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@vaibhav-yb vaibhav-yb merged commit 9c02fd0 into main Jun 2, 2023
@vaibhav-yb vaibhav-yb deleted the test-infra-fix branch August 18, 2023 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests with larger records count failing after changes in test infra
2 participants