Skip to content

impl(pubsub): update last extension for successful extend#5530

Draft
PhongChuong wants to merge 1 commit intogoogleapis:mainfrom
PhongChuong:subLastExtensionEvent
Draft

impl(pubsub): update last extension for successful extend#5530
PhongChuong wants to merge 1 commit intogoogleapis:mainfrom
PhongChuong:subLastExtensionEvent

Conversation

@PhongChuong
Copy link
Copy Markdown
Contributor

Lease state propagate extension results back to LeaseLoop using by the LeaseEvent ExtendCompleted and ExtendCompletedEO. The result are used to update the last extension value in the lease state. We also discard previously extensions that are not complete by the next lease extension interval.

An alternative solution was to use channels (either a new channel or the existing confirmed channel) but it would not allow us to easily discard old extension results from previous lease extension intervals.

Fixes: #5048

@product-auto-label product-auto-label Bot added the api: pubsub Issues related to the Pub/Sub API. label Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 97.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.76%. Comparing base (8ca77e7) to head (d6ce1c9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/pubsub/src/subscriber/lease_state.rs 95.34% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5530   +/-   ##
=======================================
  Coverage   97.76%   97.76%           
=======================================
  Files         218      218           
  Lines       49498    49571   +73     
=======================================
+ Hits        48390    48462   +72     
- Misses       1108     1109    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve subscriber lease extension logic

1 participant