From 4848fbec8b95b8783f5becbdd72e461c9fa30716 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 19 Jun 2018 16:03:00 +0200 Subject: [PATCH] Modules: convert hash to hash table for big objects. --- src/module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/module.c b/src/module.c index cb03ad2c..b5ef0da0 100644 --- a/src/module.c +++ b/src/module.c @@ -2239,6 +2239,9 @@ int RM_HashSet(RedisModuleKey *key, int flags, ...) { * to avoid a useless copy. */ if (flags & REDISMODULE_HASH_CFIELDS) low_flags |= HASH_SET_TAKE_FIELD; + + robj *argv[2] = {field,value}; + hashTypeTryConversion(key->value,argv,0,1); updated += hashTypeSet(key->value, field->ptr, value->ptr, low_flags); /* If CFIELDS is active, SDS string ownership is now of hashTypeSet(),