Skip to content
New issue

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

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

Already on GitHub? # to your account

consumer: bound the size of an error stored as Etcd shard status #366

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

jgraettinger
Copy link
Contributor

@jgraettinger jgraettinger commented Mar 12, 2024

This change is Reviewable

@jgraettinger jgraettinger requested a review from psFried March 12, 2024 16:59
Copy link
Contributor

@psFried psFried left a comment

Choose a reason for hiding this comment

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

I noticed that under some circumstances we might append these errors to an existing list, and I'm wondering if there's any way for that to still overflow the max etcd request size. I'm guessing that it's probably OK since you've limited the errors here to well under the 1.5MB max size, but just wanted to mention it in case you can think of any scenarios where we might accumulate many errors in the list.

If we wanted to be extra cautious, we could apply a limit in the Reduce function, but IDK if that's necessary.

@jgraettinger jgraettinger force-pushed the johnny/truncate-etcd-err branch from 40a6c9d to ffee35f Compare March 12, 2024 17:09
@jgraettinger
Copy link
Contributor Author

If we wanted to be extra cautious, we could apply a limit in the Reduce function, but IDK if that's necessary.

It's functionally not required, because FAILED is a terminal state for replica status. The reason for that reduction behavior is that we don't want to lose errors if we're reducing a to-be-applied FAILED status into a current PRIMARY status.

@jgraettinger jgraettinger merged commit 0323445 into master Mar 12, 2024
1 check passed
@jgraettinger jgraettinger deleted the johnny/truncate-etcd-err branch March 12, 2024 17:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants