Skip to content

Fix: asyncBulkGet decoding of hashed and unhashed keys together in one request#181

Merged
Sunjeet merged 1 commit intomasterfrom
sunjeets/fix/asyncbulkget
Feb 5, 2026
Merged

Fix: asyncBulkGet decoding of hashed and unhashed keys together in one request#181
Sunjeet merged 1 commit intomasterfrom
sunjeets/fix/asyncbulkget

Conversation

@Sunjeet
Copy link
Collaborator

@Sunjeet Sunjeet commented Jan 29, 2026

Bug: if any hashed keys were present in asyncbulkget, evCacheTranscoder would be applied to all results, and where the app specified a custom transcoder, the first application using evCacheTranscoder on un-hashed results would fallback to decoding the value as a String, and returning that String as is to the app (vs. invoking the custom transcoder on the underlying bytes).

The approach taken is to pass knowledge of hashed vs. unhashed keys and the 2 transcoders down into EVCacheClient::getAsyncBulk and onwards to EVCacheMemcachedClient::asyncGetBulk so that its gotData listener can do a one-step or two-step decode per key.

@Sunjeet Sunjeet changed the title Fix: asyncBulkGet decoding of hashed and unhashed keys together in on… Fix: asyncBulkGet decoding of hashed and unhashed keys together in one request Jan 29, 2026
try {
obj = tcService.decode(envelopeTranscoder, new CachedData(flags, data, envelopeTranscoder.getMaxSize())).get();
} catch (Exception e) {
throw new RuntimeException("Failed to decode key " + k + " using evCacheValueTranscoder", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

"using envelopeTranscoder" to be more generic? (and maybe the transcoder class name?)

@Sunjeet Sunjeet force-pushed the sunjeets/fix/asyncbulkget branch from 2679e34 to d90819e Compare February 5, 2026 20:41
@Sunjeet Sunjeet force-pushed the sunjeets/fix/asyncbulkget branch from d90819e to 3f339e2 Compare February 5, 2026 20:42
@Sunjeet Sunjeet merged commit b5814de into master Feb 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants