Skip to content

Conversation

tishun
Copy link
Collaborator

@tishun tishun commented Sep 25, 2024

(For more details on the change see #2933)

This PR merges the feature branch introducing the RedisJSON functionality

Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You applied code formatting rules using the mvn formatter:format target. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

* Most of the API layer

* Add the JSON.TYPE command

* Kotlin coroutines added;
Started JSON README.md;
Parser registry is now part of the Connection;
formatting;
chained all commands;
extracted commands in their own unit RedisJsonCommandBuilder;

* Implemented 90% of commands from top 10

* All but SET are implemented

* Integrated Jackson, finished up the SET command

* Left out a few files by mistake

* Adding some JavaDoc

* Formatting

* Implemented all JSON commands

* Introducing test containers to the testing fw

* Complete coverage with integration tests, straight scenarios

* Added Pathv1 tests

* Added RedisCE cluster support for the JSON.MGET and JSON.MSET commands

* Handle null values

* No longer using K for the JSON object keys

* Polishing

* JsonType introduced to help typization

* Remove the RedisCodec from the JsonValue/JsonParser abstraction, add configuration for custom parsers

* Extend API surface with methods that reduce the amount of required arguments

* Adding unit tests, addressing changes to README.md

* Implemented object-mapping functionality

* Addresses Ali's comments

* Addressed last bunch of comments from Ali, changed ports to not colide with existing infra

* Forgot to change ports and stop debug log

* Polishing touches
@github-actions github-actions bot added type: dependency-upgrade A dependency upgrade type: documentation A documentation update labels Sep 25, 2024
@tishun tishun added the type: feature A new feature label Sep 25, 2024
@tishun tishun added this to the 6.5.0.RELEASE milestone Sep 25, 2024
@tishun tishun merged commit 547271c into main Sep 25, 2024
5 checks passed
@tishun tishun mentioned this pull request Oct 24, 2024
26 tasks
@tishun tishun mentioned this pull request Nov 18, 2024
29 tasks
thachlp pushed a commit to thachlp/lettuce that referenced this pull request Dec 31, 2024
* Most of the API layer

* Add the JSON.TYPE command

* Kotlin coroutines added;
Started JSON README.md;
Parser registry is now part of the Connection;
formatting;
chained all commands;
extracted commands in their own unit RedisJsonCommandBuilder;

* Implemented 90% of commands from top 10

* All but SET are implemented

* Integrated Jackson, finished up the SET command

* Left out a few files by mistake

* Adding some JavaDoc

* Formatting

* Implemented all JSON commands

* Introducing test containers to the testing fw

* Complete coverage with integration tests, straight scenarios

* Added Pathv1 tests

* Added RedisCE cluster support for the JSON.MGET and JSON.MSET commands

* Handle null values

* No longer using K for the JSON object keys

* Polishing

* JsonType introduced to help typization

* Remove the RedisCodec from the JsonValue/JsonParser abstraction, add configuration for custom parsers

* Extend API surface with methods that reduce the amount of required arguments

* Adding unit tests, addressing changes to README.md

* Implemented object-mapping functionality

* Addresses Ali's comments

* Addressed last bunch of comments from Ali, changed ports to not colide with existing infra

* Forgot to change ports and stop debug log

* Polishing touches
@tishun tishun deleted the redis-json branch February 4, 2025 13:49
@@ -441,7 +441,7 @@ static BytesArgument of(ProtocolKeyword protocolKeyword) {

@Override
public String toString() {
return protocolKeyword.name();
return protocolKeyword.toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

@tishun
Why are you introducing a breaking change to an interface that is publicly available?
If there’s a valid reason, I think making the change is acceptable — but I don’t understand the intent behind this modification.
The loss of compatibility is causing issues.

Copy link
Collaborator Author

@tishun tishun Jul 2, 2025

Choose a reason for hiding this comment

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

Hey @be-hase ,

can you help me understand what the impact is and why is it breaking?

The .name() method was not a great choice to begin with, because it limits us to use procotol keywords that follow the Java naming rules, and some of the protocol keywords use fullstops, for ex. FT.CREATE

For legacy cases it should yield the same results.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@be-hase please file an issue if you are experiencing interface breakage with some small example.

I will make sure we address this retroactively in the releases that contain the JSON feature.

Copy link
Contributor

@be-hase be-hase Jul 9, 2025

Choose a reason for hiding this comment

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

@tishun
I have been using this interface to collect metrics with Micrometer.
I was using ProtocolKeyword#name as a label.
This code has been distributed internally as a library.
Although Lettuce now provides a similar mechanism, mine was implemented before that.

Now that ProtocolKeyword#name has suddenly been removed, it’s causing a NoSuchMethodError, which is a serious problem.

( sorry for late response

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No problem.

See #3368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependency-upgrade A dependency upgrade type: documentation A documentation update type: feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants