Skip to content

fix(storage): change VolumeStats fields from int32 to int64#491

Open
saiashok0981 wants to merge 1 commit into
opiproject:mainfrom
saiashok0981:fix/volume-stats-overflow
Open

fix(storage): change VolumeStats fields from int32 to int64#491
saiashok0981 wants to merge 1 commit into
opiproject:mainfrom
saiashok0981:fix/volume-stats-overflow

Conversation

@saiashok0981

Copy link
Copy Markdown

PR 1: GitHub Pull Request Description

## Description
This Pull Request updates the `VolumeStats` message fields in the storage API from `int32` to `int64`. The `int32` type overflows easily on high-throughput modern storage hardware (overflowing at ~2 GB of data or 2 billion operations), leading to incorrect telemetry reporting in monitoring shims.

Additionally, this PR fixes a minor typo in the `write_ops_count` description comment (`opeations` -> `operations`).

## Changes
- **Proto Source**: Modified `storage/opicommon.proto` to change 9 fields in `VolumeStats` to `int64` and fixed the comment typo.
- **Generated Bindings**: Automatically updated Go and Python generated files (`opicommon.pb.go` and `opicommon_pb2.py`) in both the `v1alpha1` and `v1` namespaces, ensuring compile-time safety and descriptor consistency.

## Type of Change
- [x] Bug fix (non-breaking change which fixes an telemetry overflow issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing database/gRPC shims to compile differently if expecting int32)

## Verification
- Verified Python code imports and descriptor field type updates successfully:
  ```bash
  python -c "import opicommon_pb2; print(opicommon_pb2.VolumeStats.DESCRIPTOR.fields_by_name['read_bytes_count'].type)"
  # Output: 3 (TYPE_INT64)

Cumulative counters like read/written bytes and operations in VolumeStats are changed from int32 to int64 to prevent integer overflow.

Signed-off-by:saiashok103@gmail.com
@saiashok0981 saiashok0981 requested a review from a team as a code owner June 25, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant