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

Solving warn received an empty publish shard positions update. #4907

Merged

Conversation

fulmicoton
Copy link
Contributor

This should remove all warn logging received an empty publish shard positions update. We also start logging an info showing highlighting the race condition that was causing this warning log.

Closes #4888

Copy link
Member

@guilload guilload left a comment

Choose a reason for hiding this comment

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

This could use a unit test.

.collect::<Vec<_>>();
// This can happen if the shards have been deleted by the control plane, after building
// the plan and before the apply terminated. See #4888s.
info!(missing_shards=?missing_shards, "failed to acquire all requested shards");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
info!(missing_shards=?missing_shards, "failed to acquire all requested shards");
info!(missing_shards=?missing_shards, "failed to acquire all assigned shards");

})
.collect::<Vec<_>>();
// This can happen if the shards have been deleted by the control plane, after building
// the plan and before the apply terminated. See #4888s.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// the plan and before the apply terminated. See #4888s.
// the plan and before the apply terminated. See #4888.

@@ -599,7 +616,10 @@ impl Source for IngestSource {
};
self.assigned_shards.insert(shard_id, assigned_shard);
}
self.truncate(truncate_up_to_positions).await;

if !truncate_up_to_positions.is_empty() {
Copy link
Member

Choose a reason for hiding this comment

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

We could nest this !truncate_up_to_positions.is_empty() into truncate(...) directly, and remove those checks elsewhere. That would make it much easier to test that we don't send empty truncates.

@fulmicoton fulmicoton force-pushed the issue/4888-empty-publish-shard-positions-update-warning branch 3 times, most recently from 740fd95 to e843726 Compare May 10, 2024 00:59
This should remove all warn logging `received an empty publish shard positions update`.
We also start logging an info showing highlighting the race condition
that was causing this warning log.

Closes #4888
@fulmicoton
Copy link
Contributor Author

I added a unit test in the ingest source, extended the unit test in the metastore suite, and added documentation on the spec of the metastore.

@fulmicoton fulmicoton force-pushed the issue/4888-empty-publish-shard-positions-update-warning branch from e843726 to da2501d Compare May 10, 2024 01:43
@fulmicoton fulmicoton enabled auto-merge (squash) May 10, 2024 01:44
@fulmicoton fulmicoton disabled auto-merge May 10, 2024 01:56
@fulmicoton fulmicoton merged commit 8b91fad into main May 10, 2024
5 checks passed
@fulmicoton fulmicoton deleted the issue/4888-empty-publish-shard-positions-update-warning branch May 10, 2024 01:56
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.

Fix received an empty publish shard positions update warning
2 participants