Skip to content

Conversation

@Sunjeet
Copy link
Collaborator

@Sunjeet Sunjeet commented Jan 24, 2026

NOTE: superceded by #181

Bug: if any hashed keys were present in asyncbulkget, EVCacheTranscoder would be applied to all results, and where the app had applied its own transcoder it would fallback to decoding the value to a String.

This is work in progress: need to fix TODOs, need to fixgetBulk API, write tests, and some cleanup.

The approach taken is to pass 2 sets of keys (unhashed and hashed) and 2 transcoders down to EVCacheClient::getAsyncBulk and then to EVCacheMemcachedClient::asyncGetBulk so that its gotData listener can inspect the key and apply the right transcoder.

When picking which transcoder to apply, if the key was hashed we apply the EVCacheTranscoder but if the key was not hashed we apply the custom Transcoder - I'm not 100% sure if that is semantically the best approach (vs. say checking if the data is an EVCacheValue and if it is then applying the EVCacheTranscoder) - would appreciate a second opinion on that.

Alternative approach considered was to implement a smart transcoder implementing net.spy.memcached.transcoders.Transcoder to do the right thing, but since the transcoder's decode doesn't know the key to lookup and it'd have to rely entirely on flags and data- i dont think that would cover all the cases either but happy to be proven wrong.

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