Skip to content

feat(storage): add IsOpen API for zonal read operation#16063

Open
v-pratap wants to merge 6 commits intogoogleapis:mainfrom
v-pratap:add-is-open-api
Open

feat(storage): add IsOpen API for zonal read operation#16063
v-pratap wants to merge 6 commits intogoogleapis:mainfrom
v-pratap:add-is-open-api

Conversation

@v-pratap
Copy link
Copy Markdown
Contributor

@v-pratap v-pratap commented Apr 2, 2026

Add IsOpen() to ObjectDescriptor to allow applications to detect if a descriptor is still valid without hanging on a dead connection.

The IsOpen() method returns false if the descriptor has been explicitly cancelled or if all underlying gRPC streams have permanently failed and cannot be resumed. It also incorporates a health check of the underlying gRPC channels.

@v-pratap v-pratap requested review from a team as code owners April 2, 2026 18:03
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Apr 2, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an IsOpen() method to the ObjectDescriptor class and its associated connection interfaces, allowing users to verify if a descriptor is still active and the underlying transport is healthy. The implementation includes gRPC channel state monitoring and updated unit tests. Review feedback highlighted a potential crash in ObjectDescriptorImpl::IsOpen() if the transport callback is null, as well as the risk of calling this callback while holding a mutex. Additionally, the permanent_failure_ field was identified as unused and should be either implemented or removed.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 89.90826% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.69%. Comparing base (fdbec33) to head (57b8c28).

Files with missing lines Patch % Lines
...le/cloud/storage/internal/async/connection_impl.cc 57.14% 9 Missing ⚠️
...cloud/storage/async/object_descriptor_connection.h 0.00% 1 Missing ⚠️
...rnal/async/object_descriptor_connection_tracing.cc 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16063      +/-   ##
==========================================
- Coverage   92.70%   92.69%   -0.01%     
==========================================
  Files        2343     2343              
  Lines      216644   216740      +96     
==========================================
+ Hits       200838   200910      +72     
- Misses      15806    15830      +24     

☔ 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: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants