mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-04 10:39:50 +00:00
if HT is full with entries and tombstones: give up/fail early
This commit is contained in:
parent
32519617b6
commit
51189e1383
1 changed files with 8 additions and 2 deletions
|
@ -177,8 +177,14 @@ hashindex_lookup(HashIndex *index, const unsigned char *key, int *start_idx)
|
||||||
idx -= index->num_buckets;
|
idx -= index->num_buckets;
|
||||||
}
|
}
|
||||||
if(idx == start) {
|
if(idx == start) {
|
||||||
/* we have done a full pass over all buckets. */
|
/* We have done a full pass over all buckets.
|
||||||
break;
|
* - We did not find a bucket with the key we searched for.
|
||||||
|
* - We did not find an empty bucket either.
|
||||||
|
* So all buckets are either full or deleted/tombstones.
|
||||||
|
* This is an invalid state we never should get into, see
|
||||||
|
* upper_limit and min_empty.
|
||||||
|
*/
|
||||||
|
assert(0); /* should never happen - something is wrong here. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* we get here if we did not find a bucket with the key we searched for. */
|
/* we get here if we did not find a bucket with the key we searched for. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue