Java: Address pubsub PR comments#1773
Merged
Elen-Ghulam merged 19 commits intovalkey-io:mainfrom Jul 5, 2024
Merged
Conversation
Collaborator
Author
|
@ikolomi FYI |
java/client/src/main/java/glide/api/commands/PubSubClusterCommands.java
Outdated
Show resolved
Hide resolved
Collaborator
Author
|
FYI @eifrah-aws |
aeeb2c8 to
f3a0600
Compare
Collaborator
Author
|
@ikolomi @eifrah-aws @Yury-Fridlyand |
ikolomi
requested changes
Jul 3, 2024
8472e14 to
f5e9262
Compare
java/client/src/main/java/glide/api/commands/PubSubBaseCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/PubSubClusterCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/models/configuration/BaseSubscriptionConfiguration.java
Show resolved
Hide resolved
java/client/src/main/java/glide/api/models/configuration/BaseSubscriptionConfiguration.java
Show resolved
Hide resolved
java/client/src/main/java/glide/api/models/configuration/BaseSubscriptionConfiguration.java
Show resolved
Hide resolved
java/client/src/main/java/glide/connectors/handlers/MessageHandler.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/connectors/handlers/MessageHandler.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/managers/ConnectionManager.java
Outdated
Show resolved
Hide resolved
Yury-Fridlyand
left a comment
There was a problem hiding this comment.
I think we need a new IT which proves that GS approach works.
09b5e49 to
29828b4
Compare
java/client/src/main/java/glide/connectors/handlers/ReadHandler.java
Outdated
Show resolved
Hide resolved
Collaborator
Author
All tests use the GlideString variants of functions and PubSubMessage internally use GlideString. Do you mean to test messages that are non-UTF-8-encodable? |
29828b4 to
d66b9c6
Compare
ikolomi
approved these changes
Jul 4, 2024
c66172c to
6cbcf46
Compare
| cause.printStackTrace(); | ||
|
|
||
| // Unwrap. Only works for Exceptions and not Errors. | ||
| throw ((MessageHandler.MessageCallbackException) cause).getCause(); |
There was a problem hiding this comment.
where it goes to after rethrowing?
Collaborator
Author
There was a problem hiding this comment.
Netty catches and logs it. I think Netty will re-use the thread after.
6cbcf46 to
3cd69eb
Compare
3cd69eb to
1bcbbe9
Compare
1bcbbe9 to
00abbdb
Compare
Yury-Fridlyand
approved these changes
Jul 4, 2024
4b000d5 to
b1e01d5
Compare
Also add GlideString version of OK constant (named TOK from Python)
* Use GlideString for MessageHandler responses * Have GlideString overloads for PubSub comamnds return String instead of GlideString OKs.
Add the following tests from Python: * pubsub_exact_max_size_message * pubsub_sharded_max_size_message * pubsub_exact_max_size_message_callback * pubsub_sharded_max_size_message_callback
Supply a message with the exception being logged and fix the output when printing an exception
* Senders do not need subscriptions/callbacks. * Correct validating the pattern by checking that the optional is empty instead of null. * Use 512MB messages for max-size tests * Make client cleanup match the other tests
b1e01d5 to
aeb8ee7
Compare
Exceptions from the callback now escape the netty handler. This will get Netty to log it. We also explicitly log the the Glide log and System.err
Elen-Ghulam
approved these changes
Jul 5, 2024
cyip10
pushed a commit
to Bit-Quill/valkey-glide
that referenced
this pull request
Jul 16, 2024
* Remove spublish and provide two overloads for publish * Change publish argument order to match Python * Explicitly prevent the context being non-null and the callback being null * Parameterize three_publishing_clients_same_name_with_sharded * Address PR feedback * Add GlideString versions of pubsub commands Also add GlideString version of OK constant (named TOK from Python) * PubSubMessages should use GlideStrings instead of String * Spotless * Address PR comments * Use GlideString for MessageHandler responses * Have GlideString overloads for PubSub comamnds return String instead of GlideString OKs. * Have GlideString log byte array hash * Add pubsub MaxSize integration tests (disabled) Add the following tests from Python: * pubsub_exact_max_size_message * pubsub_sharded_max_size_message * pubsub_exact_max_size_message_callback * pubsub_sharded_max_size_message_callback * Improve exception logging. Supply a message with the exception being logged and fix the output when printing an exception * Add exception-from-callback test * Make the callback exception error handling test pass * PubSub Test fixes * Senders do not need subscriptions/callbacks. * Correct validating the pattern by checking that the optional is empty instead of null. * Use 512MB messages for max-size tests * Make client cleanup match the other tests * Add pub-sub testing with non-UTF-8 data * Simplify the non-String PubSub test * Remove stale TODOs * Change pubsub callback exception handling to pass through Netty Exceptions from the callback now escape the netty handler. This will get Netty to log it. We also explicitly log the the Glide log and System.err
Yury-Fridlyand
pushed a commit
to Bit-Quill/valkey-glide
that referenced
this pull request
Jun 6, 2025
* Remove spublish and provide two overloads for publish * Change publish argument order to match Python * Explicitly prevent the context being non-null and the callback being null * Parameterize three_publishing_clients_same_name_with_sharded * Address PR feedback * Add GlideString versions of pubsub commands Also add GlideString version of OK constant (named TOK from Python) * PubSubMessages should use GlideStrings instead of String * Spotless * Address PR comments * Use GlideString for MessageHandler responses * Have GlideString overloads for PubSub comamnds return String instead of GlideString OKs. * Have GlideString log byte array hash * Add pubsub MaxSize integration tests (disabled) Add the following tests from Python: * pubsub_exact_max_size_message * pubsub_sharded_max_size_message * pubsub_exact_max_size_message_callback * pubsub_sharded_max_size_message_callback * Improve exception logging. Supply a message with the exception being logged and fix the output when printing an exception * Add exception-from-callback test * Make the callback exception error handling test pass * PubSub Test fixes * Senders do not need subscriptions/callbacks. * Correct validating the pattern by checking that the optional is empty instead of null. * Use 512MB messages for max-size tests * Make client cleanup match the other tests * Add pub-sub testing with non-UTF-8 data * Simplify the non-String PubSub test * Remove stale TODOs * Change pubsub callback exception handling to pass through Netty Exceptions from the callback now escape the netty handler. This will get Netty to log it. We also explicitly log the the Glide log and System.err
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Address some of the comments in #1662 about aligning with Python:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.