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

Extract error sorting code to module. #1077

Merged
merged 3 commits into from
Mar 6, 2024
Merged

Conversation

nihohit
Copy link
Contributor

@nihohit nihohit commented Mar 5, 2024

This will allow FFI clients to use the same logic.

Issue #, if available:
#1066

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@nihohit nihohit requested a review from a team as a code owner March 5, 2024 11:26
This will allow FFI clients to use the same logic.
glide-core/src/errors.rs Show resolved Hide resolved
glide-core/src/errors.rs Show resolved Hide resolved
Unspecified,
ExecAbort,
Timeout,
Disconnect,
Copy link
Collaborator

Choose a reason for hiding this comment

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

ClosingError is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when would an FFI client return a closing error?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is closing error applicable for UDS clients only?

Copy link
Contributor

Choose a reason for hiding this comment

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

ATM yes. Only UDS clients have a shared resource that might be reach an unusable state.

Copy link
Contributor

Choose a reason for hiding this comment

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

correction: an FFI wrapper also has a shared resource - the client itself. if the wrapper releases the client, it has reached closing state. but that's pure wrapper-side logic.

@Yury-Fridlyand Yury-Fridlyand linked an issue Mar 5, 2024 that may be closed by this pull request
2 tasks
@Yury-Fridlyand Yury-Fridlyand added the Rust core redis-rs/glide-core matter label Mar 5, 2024
@Yury-Fridlyand
Copy link
Collaborator

Java CI fails, because on error scenarios (e.g. wrong arguments) it received Disconnect protobuf error instead of Unspecified as it was before in https://github.com/aws/glide-for-redis/blob/5c4601584aa021b05e4f0c8c9cd8b013b5e1b847/java/client/src/main/java/glide/connectors/handlers/CallbackDispatcher.java#L91-L102

request_error {
  type: Disconnect
  message: "Received connection error `An error was signalled by the server - ResponseError: hash value is not an integer`. Will attempt to reconnect"
}

java/src/lib.rs Show resolved Hide resolved
@nihohit nihohit force-pushed the errors branch 2 times, most recently from 735e8a9 to cc8d8ec Compare March 6, 2024 16:41
@shachlanAmazon shachlanAmazon merged commit ffb34fc into valkey-io:main Mar 6, 2024
43 of 45 checks passed
@nihohit nihohit deleted the errors branch March 6, 2024 17:38
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
* Extract error sorting code to module.

This will allow FFI clients to use the same logic.

* ++redis-rs

* fix comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust core redis-rs/glide-core matter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Glide core should filter/translate errors from redis-rs for FFI clients
4 participants