feat: watch improvements#310
feat: watch improvements#310jason-lynch wants to merge 1 commit intofeat/put-with-updated-versionfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
f3edc39 to
0905973
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Makes several substantial improvements to the `storage.Watch` operations: - `Watch` now does a synchronous `Get` operation before the starting the watch to get the current value(s) and to get the start revision for the watch. Callers no longer have to do this operation themselves. - `Watch` now restarts itself automatically using the most recently- fetched revision. We were previously repeating this restart logic in every caller. Restarts are rate-limited to 1 per second. - `Watch` reports errors over an error channel, matching the convention that we've established everywhere. We had an unused `Until` operation and I opted to remove it rather than update it for these changes.
fa785be to
64a9954
Compare
0905973 to
fa49e10
Compare
Summary
Makes several substantial improvements to the
storage.Watchoperations:Watchnow does a synchronousGetoperation before starting the watch to get the current value(s) and to get the start revision for the watch. Callers no longer have to do this operation themselves.Watchnow restarts itself automatically using the most recently-fetched revision. We were previously repeating this restart logic in every caller. Restarts are rate-limited to 1 per second.Watchreports errors over an error channel, matching the convention that we've established everywhere.We had an unused
Untiloperation, so I opted to remove it rather than update it to reflect these changes.Testing
From the user's perspective, everything should function the same as it did before. The changes in this PR were more focused on improving the watch's usability and edge-case behavior, such as when a
Putoccurs between the initialGetand theWatchoperations, or the recovery behavior after an outage.