[
https://issues.apache.org/jira/browse/GEODE-8182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17117773#comment-17117773
]
ASF GitHub Bot commented on GEODE-8182:
---------------------------------------
jdeppe-pivotal commented on a change in pull request #5165:
URL: https://github.com/apache/geode/pull/5165#discussion_r431140254
##########
File path:
geode-redis/src/main/java/org/apache/geode/redis/internal/executor/string/SetNXExecutor.java
##########
@@ -36,27 +36,23 @@
public void executeCommand(Command command, ExecutionHandlerContext context)
{
List<byte[]> commandElems = command.getProcessedCommand();
- Region<ByteArrayWrapper, RedisData> region =
- context.getRegionProvider().getStringsRegion();
-
if (commandElems.size() < 3) {
command.setResponse(Coder.getErrorResponse(context.getByteBufAllocator(),
ArityDef.SETNX));
return;
}
ByteArrayWrapper key = command.getKey();
- checkAndSetDataType(key, context);
- byte[] value = commandElems.get(VALUE_INDEX);
+ ByteArrayWrapper value = new
ByteArrayWrapper(commandElems.get(VALUE_INDEX));
- Object oldValue =
- region.putIfAbsent(key, (RedisData) new RedisString(new
ByteArrayWrapper(value)));
+ RedisStringCommands stringCommands = getRedisStringCommands(context);
+ SetOptions setOptions = new SetOptions(NX, 0L, null, false);
Review comment:
This should be `SetOptions(NX, 0L, ExpireUnit.NONE, false);`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Move RedisStrings to "data" region (no metadata region)
> -------------------------------------------------------
>
> Key: GEODE-8182
> URL: https://issues.apache.org/jira/browse/GEODE-8182
> Project: Geode
> Issue Type: Improvement
> Components: redis
> Reporter: Jens Deppe
> Assignee: Darrel Schneider
> Priority: Major
>
> Part of ongoing refactoring to move to a single data region
--
This message was sent by Atlassian Jira
(v8.3.4#803005)