Fix for DEBUG DIGEST, key may expire on lookup

This commit is contained in:
antirez 2011-05-13 11:42:02 +02:00
parent cd128d2882
commit cc8a0f898b

View File

@ -101,6 +101,11 @@ void computeDatasetDigest(unsigned char *final) {
/* Make sure the key is loaded if VM is active */
o = lookupKeyRead(db,keyobj);
if (o == NULL) {
/* Key expired on lookup? Try the next one. */
decrRefCount(keyobj);
continue;
}
aux = htonl(o->type);
mixDigest(digest,&aux,sizeof(aux));