DATAREDIS-791 - Disable ifValueNotExists() flag in ReactiveHashCommands.hMSet.
We now no longer set ifValueNotExists() in ReactiveHashCommands.hMSet to always upsert hash entries. Previously, we called HSETNX if hMSet was called with a single tuple which did not overwrite existing entries. Align return value of hMSet to return always true as calling internally HSET returns 1 only on newly set hash fields and setting an existing field resulted previously in false. Original Pull Request: #325
This commit is contained in:
committed by
Christoph Strobl
parent
e0b73c7d75
commit
2902d3fb4a
@@ -195,8 +195,7 @@ public interface ReactiveHashCommands {
|
||||
Assert.notNull(key, "Key must not be null!");
|
||||
Assert.notNull(fieldValueMap, "Field must not be null!");
|
||||
|
||||
return hSet(Mono.just(HSetCommand.fieldValues(fieldValueMap).forKey(key).ifValueNotExists())).next()
|
||||
.map(BooleanResponse::getOutput);
|
||||
return hSet(Mono.just(HSetCommand.fieldValues(fieldValueMap).forKey(key))).next().map(it -> true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user