Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

RouterCallImpl: fix unpacking 'vshard.storage.call' response #35

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

nurzhan-saktaganov
Copy link
Collaborator

  • handle case when len(respData) < 2
  • more informative logs and typo fix
  • fix "err" redeclaring in inner block
  • add missed "continue" operator in case when isVShardRespOk is false

* handle case when len(respData) < 2
* more informative logs and typo fix
* fix "err" redeclaring in inner block
* add missed "continue" operator in case when isVShardRespOk is false
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 4.54545% with 21 lines in your changes missing coverage. Please review.

Project coverage is 21.67%. Comparing base (84c49a6) to head (b1e5b4f).

Files Patch % Lines
api.go 0.00% 21 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
- Coverage   22.04%   21.67%   -0.38%     
==========================================
  Files           9        9              
  Lines         635      646      +11     
==========================================
  Hits          140      140              
- Misses        488      499      +11     
  Partials        7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@KaymeKaydex KaymeKaydex left a comment

Choose a reason for hiding this comment

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

Thank u for review, pls check some fixes & add CHANGELOG

api.go Outdated
@@ -175,19 +190,28 @@ func (r *Router) RouterCallImpl(ctx context.Context,
if !isVShardRespOk { // error
errorResp := &StorageCallAssertError{}

err = future.GetTyped(&[]interface{}{&isVShardRespOk, errorResp})
if len(respData) < 2 {
err = fmt.Errorf("unexpected response length when respData[0] == nil: %d", len(respData))
Copy link
Owner

Choose a reason for hiding this comment

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

resp data cant be nil, cause we check it before

Copy link
Owner

Choose a reason for hiding this comment

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

and add few comments pls

api.go Show resolved Hide resolved
* add more informative comments to RouterCallImpl
* update CHANGELOG.md
@KaymeKaydex KaymeKaydex merged commit 87be7d5 into master Aug 26, 2024
1 check passed
KaymeKaydex pushed a commit that referenced this pull request Aug 26, 2024
@nurzhan-saktaganov nurzhan-saktaganov added the bug Something isn't working label Sep 1, 2024
@nurzhan-saktaganov nurzhan-saktaganov deleted the nsaktaganov_vshard_storage_call_resp_unpack_fix branch September 17, 2024 16:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants