-
Notifications
You must be signed in to change notification settings - Fork 54
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
Java: Address pubsub PR comments #1773
Java: Address pubsub PR comments #1773
Conversation
@ikolomi FYI |
java/client/src/main/java/glide/api/commands/PubSubClusterCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/models/ClusterTransaction.java
Outdated
Show resolved
Hide resolved
FYI @eifrah-aws |
aeeb2c8
to
f3a0600
Compare
@ikolomi @eifrah-aws @Yury-Fridlyand |
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where it goes to after rethrowing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
* 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
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.