Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4848fbec
Commit
4848fbec
authored
Jun 19, 2018
by
antirez
Browse files
Modules: convert hash to hash table for big objects.
parent
333c98c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
4848fbec
...
@@ -2239,6 +2239,9 @@ int RM_HashSet(RedisModuleKey *key, int flags, ...) {
...
@@ -2239,6 +2239,9 @@ int RM_HashSet(RedisModuleKey *key, int flags, ...) {
* to avoid a useless copy. */
* to avoid a useless copy. */
if
(
flags
&
REDISMODULE_HASH_CFIELDS
)
if
(
flags
&
REDISMODULE_HASH_CFIELDS
)
low_flags
|=
HASH_SET_TAKE_FIELD
;
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
);
updated
+=
hashTypeSet
(
key
->
value
,
field
->
ptr
,
value
->
ptr
,
low_flags
);
/* If CFIELDS is active, SDS string ownership is now of hashTypeSet(),
/* If CFIELDS is active, SDS string ownership is now of hashTypeSet(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment