[DATAREDIS-993] Object serialization as HashValue with StreamOperations Created: 13/Jun/19 Updated: 08/Aug/19 Resolved: 18/Jun/19
|Project:||Spring Data Redis|
|Affects Version/s:||2.2 M4 (Moore)|
|Fix Version/s:||2.2 RC2 (Moore)|
|Reporter:||Romain Beghi||Assignee:||Mark Paluch|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Pull Request URL:||https://github.com/spring-projects/spring-data-redis/pull/455|
Given a ReactiveStreamOperations<String, String, DummyObject>, configured that way :
Record serialization is done here : DefaultReactiveStreamOperations.serializeRecordFields
Where HashKey and HashValue distinct serializers are properly called.
However, with a StreamOperations<String, String, DummyObject>, configured that way :
Serialization fails and return
Record serialization is done here :
And use fieldSerializer for both HashKey and HashValue serialization, even if its input parameters are streamSerializer, fieldSerializer and valueSerializer.
Such usage is done here :
The fix only consists to use valueSerializer for HashValue serialization rather than fieldSerializer.
I'm linking to this ticket a short (and improvable) PR for this issue.
|Comment by Mark Paluch [ 18/Jun/19 ]|
Good catch, thanks for providing a fix.