Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdsclient: Populate total_issued_requests count in LRS load report #7544

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

arjan-bal
Copy link
Contributor

@arjan-bal arjan-bal commented Aug 21, 2024

Fixes: #7538

This PR populates the total issued request count which is already being added by Java and c-core clients.

The issued request counter is incremented when a new request is started. The counter is reset when a load report is sent to the LRS server

RELEASE NOTES:

  • xdsclient: LRS load reports contain the total_issued_requests field.

@arjan-bal arjan-bal force-pushed the lrs-issued-count branch 2 times, most recently from 3f2280b to 353a856 Compare August 21, 2024 16:29
@arjan-bal arjan-bal marked this pull request as draft August 21, 2024 16:33
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.85%. Comparing base (b45fc41) to head (70f7ab7).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7544      +/-   ##
==========================================
- Coverage   82.07%   81.85%   -0.23%     
==========================================
  Files         360      361       +1     
  Lines       27533    27825     +292     
==========================================
+ Hits        22599    22775     +176     
- Misses       3759     3853      +94     
- Partials     1175     1197      +22     
Files Coverage Δ
xds/internal/xdsclient/load/store.go 90.58% <100.00%> (+0.46%) ⬆️
xds/internal/xdsclient/transport/loadreport.go 82.57% <100.00%> (+0.13%) ⬆️

... and 44 files with indirect coverage changes

@arjan-bal arjan-bal added this to the 1.67 Release milestone Aug 21, 2024
@arjan-bal arjan-bal added the Type: Feature New features or improvements in behavior label Aug 21, 2024
@arjan-bal arjan-bal marked this pull request as ready for review August 21, 2024 17:02
@arjan-bal arjan-bal requested a review from dfawley August 21, 2024 17:03
Copy link
Member

@dfawley dfawley left a comment

Choose a reason for hiding this comment

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

LGTM, just one request for a test case.

assertString(xdsinternal.LocalityID{}.ToString): {RequestStats: load.RequestData{Succeeded: uint64(rpcCount - maxRequest + 50)}},
assertString(xdsinternal.LocalityID{}.ToString): {RequestStats: load.RequestData{
Succeeded: uint64(rpcCount - maxRequest + 50),
Issued: uint64(rpcCount - maxRequest + 50),
Copy link
Member

Choose a reason for hiding this comment

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

Are there no tests that include failed calls? It would be nice to have at least one test case where succeeded != issued.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed a couple of test cases to have both errors and successful RPCs.

@dfawley dfawley assigned arjan-bal and unassigned dfawley Aug 21, 2024
@arjan-bal arjan-bal assigned dfawley and unassigned arjan-bal Aug 21, 2024
@arjan-bal arjan-bal requested a review from dfawley August 21, 2024 19:07
Comment on lines 187 to 188
Succeeded: (rpcCount - dropCount) / 2,
Errored: (rpcCount - dropCount) / 2,
Copy link
Member

Choose a reason for hiding this comment

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

Can we make it so these aren't the same? I.e. if we reversed the two in code then the test would still pass. E.g. make it fail 1/4th and succeed in 3/4ths.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@arjan-bal arjan-bal merged commit 0b6f354 into grpc:master Aug 26, 2024
14 checks passed
@arjan-bal arjan-bal deleted the lrs-issued-count branch August 26, 2024 20:40
arjan-bal added a commit to arjan-bal/grpc-go that referenced this pull request Aug 26, 2024
…rpc#7544)

* Populate isssued count in LRS load report

* Test success, error and issued counts

* Make pass/faiil fractions unequal
@arjan-bal arjan-bal modified the milestones: 1.67 Release, 1.66 Release Aug 26, 2024
arjan-bal added a commit that referenced this pull request Aug 26, 2024
…7544) (#7565)

* Populate issued count in LRS load report

* Test success, error and issued counts

* Make pass/fail fractions unequal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xDS load reporting is not populating total_issued_requests field in LRS reports
2 participants