feat(storage): add IsOpen API for zonal read operation#16063
feat(storage): add IsOpen API for zonal read operation#16063v-pratap wants to merge 6 commits intogoogleapis:mainfrom
Conversation
There was a problem hiding this comment.
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 Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
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.