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

Serialized errors from vshard #186

Open
ArtDu opened this issue Jul 14, 2021 · 4 comments
Open

Serialized errors from vshard #186

ArtDu opened this issue Jul 14, 2021 · 4 comments
Labels
blocked Not ready to be implemented customer feature A new functionality

Comments

@ArtDu
Copy link
Contributor

ArtDu commented Jul 14, 2021

It's hard to parse vshard's internal errors.

0.0.0.0:3301> crud.get("vets", 11111111-1111-1111-1111-111111111111)
---
- null
- line: 75
  class_name: Get
  err: "Failed to call get on storage-side: Call: Failed for 6558ab95-7c60-48fe-8d46-75d428033d54:
    Function returned an error: {\"code\":77,\"base_type\":\"ClientError\",\"type\":\"ClientError\",\"message\":\"Connection
    refused\",\"trace\":[{\"file\":\"builtin\\/box\\/net_box.lua\",\"line\":541}]}\nstack
    traceback:\n\t...inic/cluster/.rocks/share/tarantool/crud/common/call.lua:138:
    in function 'single'\n\t...ng-petclinic/cluster/.rocks/share/tarantool/crud/get.lua:68:
    in function 'func'\n\t...ic/cluster/.rocks/share/tarantool/crud/common/schema.lua:89:
    in function <...ic/cluster/.rocks/share/tarantool/crud/common/schema.lua:84>\n\t[C]:
    in function 'pcall'\n\tbuiltin/box/console.lua:402: in function <builtin/box/console.lua:378>\n\t[C]:
    at 0x0104178834"
  file: '...ng-petclinic/cluster/.rocks/share/tarantool/crud/get.lua'
  str: "Get: Failed to call get on storage-side: Call: Failed for 6558ab95-7c60-48fe-8d46-75d428033d54:
    Function returned an error: {\"code\":77,\"base_type\":\"ClientError\",\"type\":\"ClientError\",\"message\":\"Connection
    refused\",\"trace\":[{\"file\":\"builtin\\/box\\/net_box.lua\",\"line\":541}]}\nstack
    traceback:\n\t...inic/cluster/.rocks/share/tarantool/crud/common/call.lua:138:
    in function 'single'\n\t...ng-petclinic/cluster/.rocks/share/tarantool/crud/get.lua:68:
    in function 'func'\n\t...ic/cluster/.rocks/share/tarantool/crud/common/schema.lua:89:
    in function <...ic/cluster/.rocks/share/tarantool/crud/common/schema.lua:84>\n\t[C]:
    in function 'pcall'\n\tbuiltin/box/console.lua:402: in function <builtin/box/console.lua:378>\n\t[C]:
    at 0x0104178834"
...

It would be possible to add some cause field, where the internal error would lie like a table, but no string
Something like that:

0.0.0.0:3301> crud.get("vets", 11111111-1111-1111-1111-111111111111)
---
- null
- line: 75
  class_name: Get
  err: "Failed to call get on storage-side: Call: Failed for 6558ab95-7c60-48fe-8d46-75d428033d54"
  cause: - code: 78
           base_type: ClientError
           type: ClientError
           message: Connection refused
           trace:
            ....
  file: '...ng-petclinic/cluster/.rocks/share/tarantool/crud/get.lua'
...

@ArtDu ArtDu added the customer label Jul 14, 2021
@akudiyar
Copy link
Contributor

Affects tarantool/cartridge-java#89

@olegrok
Copy link
Contributor

olegrok commented Jul 20, 2021

Could we transfer this issue to "tarantool/errors"?

I like more "general" solutions. So it could be useful not only for crud.

@ArtDu
Copy link
Contributor Author

ArtDu commented Jul 21, 2021

Yeah, you are right, it is better to implement this in "tarantool/errors", after that in crud to fix the passing error through the new functionality. I will create a ticket in "tarantool/errors".

@DifferentialOrange
Copy link
Member

So it seems that migrating to box.error should solve the issue, if it will work fine with vshard, I think it's better to wait until 1.10.x end of support then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Not ready to be implemented customer feature A new functionality
Projects
None yet
Development

No branches or pull requests

7 participants