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

ISPN-14100 REST keys operation cache value should match all #10275

Merged
merged 1 commit into from Sep 27, 2022

Conversation

jabolina
Copy link
Member

https://issues.redhat.com/browse/ISPN-14100

Instead of using TEXT_PLAIN to retrieve a cache, which, IIUC converts the values, we use MATCH_ALL. Also adding a test with different media-types and minor fix in the string escape.

@jabolina
Copy link
Member Author

Should I open another JIRA for the string escape?

@@ -361,7 +362,7 @@ private CompletionStage<RestResponse> streamKeys(RestRequest request) {
int batch = batchParam == null || batchParam.isEmpty() ? STREAM_BATCH_SIZE : Integer.parseInt(batchParam);
int limit = limitParam == null || limitParam.isEmpty() ? -1 : Integer.parseInt(limitParam);

Cache<?, ?> cache = invocationHelper.getRestCacheManager().getCache(cacheName, TEXT_PLAIN, TEXT_PLAIN, request);
Cache<?, ?> cache = invocationHelper.getRestCacheManager().getCache(cacheName, TEXT_PLAIN, MATCH_ALL, request);
Copy link
Member

Choose a reason for hiding this comment

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

So the test still passes if I revert this. Maybe something missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, with the TEXT_PLAIN matcher it works as expected, the only operation we do with the returned cache is over the keys. I've changed this mostly to be clear that values with any type are ok. I can revert it.

@wburns wburns added the Question label Sep 7, 2022
@jabolina jabolina added this to the 14.0.0.Final milestone Sep 26, 2022
@tristantarrant tristantarrant merged commit 7debb3b into infinispan:main Sep 27, 2022
@tristantarrant
Copy link
Member

Merged, thanks

@jabolina jabolina deleted the ISPN-14100 branch September 27, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants