Skip to content

server: report distinct read/write volume throttle rates - #14048

Open
nagaboinaramgopal wants to merge 1 commit into
apache:4.20from
nagaboinaramgopal:fix/volume-throttle-rate-response
Open

server: report distinct read/write volume throttle rates#14048
nagaboinaramgopal wants to merge 1 commit into
apache:4.20from
nagaboinaramgopal:fix/volume-throttle-rate-response

Conversation

@nagaboinaramgopal

Copy link
Copy Markdown

VolumeJoinDaoImpl.newVolumeResponse fed the read getter to the write setter for the byte rate, and the write getter to the read setter for IOPS, so listVolumes returned the read byte-rate as the write byte-rate and the write IOPS as the read IOPS for any volume with asymmetric throttling. Map each rate to its own field.

Tested: new unit test on the extracted setThrottleRates helper; VolumeJoinDaoImplTest green

VolumeJoinDaoImpl.newVolumeResponse fed the read getter to the write setter for
the byte rate, and the write getter to the read setter for IOPS, so listVolumes
returned the read byte-rate as the write byte-rate and the write IOPS as the
read IOPS for any volume with asymmetric throttling. Map each rate to its own
field. The assignments are extracted into setThrottleRates so the mapping is
covered by a unit test.

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clgtm, a true bug fixed

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 16.34%. Comparing base (2cd8c5e) to head (aa119b5).

Files with missing lines Patch % Lines
...ava/com/cloud/api/query/dao/VolumeJoinDaoImpl.java 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #14048      +/-   ##
============================================
- Coverage     16.34%   16.34%   -0.01%     
  Complexity    13574    13574              
============================================
  Files          5669     5669              
  Lines        501368   501371       +3     
  Branches      60903    60903              
============================================
- Hits          81964    81963       -1     
- Misses       410219   410221       +2     
- Partials       9185     9187       +2     
Flag Coverage Δ
uitests 4.14% <ø> (ø)
unittests 17.20% <85.71%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants