Skip to content

Commit 4c1c9f3

Browse files
committed
Prevent unnecessary failure.
1 parent 97b34e2 commit 4c1c9f3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/xorfilter/3wise_xor_binary_fuse_filter_lowmem.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ Status XorBinaryFuseFilter<ItemType, FingerprintType, HashFamily>::AddAll(
175175
// we have a possible counter overflow
176176
// this branch is never taken except if there is a problem in the hash code
177177
// in which case construction fails
178-
continue;
178+
memset(fingerprints, ~0, arrayLength * sizeof(FingerprintType));
179+
return Ok;
179180
}
180181

181182
reverseOrderPos = 0;

src/xorfilter/4wise_xor_binary_fuse_filter_lowmem.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ Status XorBinaryFuseFilter<ItemType, FingerprintType, HashFamily>::AddAll(
192192
// we have a possible counter overflow
193193
// this branch is never taken except if there is a problem in the hash code
194194
// in which case construction fails
195-
continue;
195+
memset(fingerprints, ~0, arrayLength * sizeof(FingerprintType));
196+
return Ok;
196197
}
197198
reverseOrderPos = 0;
198199
size_t alonePos = 0;

0 commit comments

Comments
 (0)