-
Notifications
You must be signed in to change notification settings - Fork 577
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
cloud_storage/tests: wait for partition metadata during topic recovery tests #5757
cloud_storage/tests: wait for partition metadata during topic recovery tests #5757
Conversation
for partition_info in self._rpk.describe_topic(topic_name): | ||
hwm = partition_info.high_watermark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we calculate the max/min/first value which is not None
watermark over all partitions?
right now we are effectively just getting the value from the last row that rpk produced.
cc @Lazin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need high watermark for this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (when it will stop being a draft PR)
3339469
to
4cd151e
Compare
I had a bug in the way watermark was captured, latest commit should fix it. |
errors:
#5378 related, should be fixed with PR #5742
seems an instance of #5608 |
Looks good. Only problem is your force-push fix ended up in the wrong commit. I've done this before, 😅. |
If a leader election happened right before we verify topic watermark, rpk may return an error such as "not leader for partition" due to stale metadata. Instead of failing immediately this change makes the caller wait for upto 1 minute so that the new leadership info is propagated to the cluster and rpk returns the correct partition metadata.
4cd151e
to
d94b00a
Compare
/backport v22.2.x |
/backport v22.1.x |
Cover Letter
If a leader election happened right before we verify topic watermark, rpk may return an error such as "not leader for partition" due to stale metadata.
Instead of failing immediately this change makes the caller wait for upto 1 minute so that the new leadership info is propagated to the cluster and rpk returns the correct partition metadata.
in a failed test in linked CI failure the following logs are seen due to metadata returned during leader election:
fixes #5737
force push: fix capturing the variable in wait_until
Release Notes