mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Streams: DEBUG DIGEST support.
This commit is contained in:
parent
f42df6f43a
commit
8ac76be5f2
21
src/debug.c
21
src/debug.c
@ -239,6 +239,27 @@ void computeDatasetDigest(unsigned char *final) {
|
|||||||
xorDigest(digest,eledigest,20);
|
xorDigest(digest,eledigest,20);
|
||||||
}
|
}
|
||||||
hashTypeReleaseIterator(hi);
|
hashTypeReleaseIterator(hi);
|
||||||
|
} else if (o->type == OBJ_STREAM) {
|
||||||
|
streamIterator si;
|
||||||
|
streamIteratorStart(&si,o->ptr,NULL,NULL,0);
|
||||||
|
streamID id;
|
||||||
|
int64_t numfields;
|
||||||
|
|
||||||
|
while(streamIteratorGetID(&si,&id,&numfields)) {
|
||||||
|
sds itemid = sdscatfmt(sdsempty(),"%U.%U",id.ms,id.seq);
|
||||||
|
mixDigest(digest,itemid,sdslen(itemid));
|
||||||
|
sdsfree(itemid);
|
||||||
|
|
||||||
|
while(numfields--) {
|
||||||
|
unsigned char *field, *value;
|
||||||
|
int64_t field_len, value_len;
|
||||||
|
streamIteratorGetField(&si,&field,&value,
|
||||||
|
&field_len,&value_len);
|
||||||
|
mixDigest(digest,field,field_len);
|
||||||
|
mixDigest(digest,value,value_len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
streamIteratorStop(&si);
|
||||||
} else if (o->type == OBJ_MODULE) {
|
} else if (o->type == OBJ_MODULE) {
|
||||||
RedisModuleDigest md;
|
RedisModuleDigest md;
|
||||||
moduleValue *mv = o->ptr;
|
moduleValue *mv = o->ptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user