collect db values for integrity check in chunks
This commit is contained in:
parent
134aad29f1
commit
929448d64b
1 changed files with 5 additions and 3 deletions
|
@ -135,8 +135,10 @@ class RevertableOpStack:
|
||||||
existing = {}
|
existing = {}
|
||||||
if self._enforce_integrity and unique_keys:
|
if self._enforce_integrity and unique_keys:
|
||||||
unique_keys = list(unique_keys)
|
unique_keys = list(unique_keys)
|
||||||
|
for idx in range(0, len(unique_keys), 10000):
|
||||||
|
batch = unique_keys[idx:idx+10000]
|
||||||
existing.update({
|
existing.update({
|
||||||
k: v for k, v in zip(unique_keys, self._multi_get(unique_keys))
|
k: v for k, v in zip(batch, self._multi_get(batch))
|
||||||
})
|
})
|
||||||
|
|
||||||
for op in ops_to_apply:
|
for op in ops_to_apply:
|
||||||
|
|
Loading…
Reference in a new issue