remove debug prints

This commit is contained in:
Jack Robison 2021-06-22 17:29:21 -04:00
parent 4d3573724a
commit d119fcfc98
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -87,21 +87,11 @@ class RevertableOpStack:
self._items[op.key].pop() self._items[op.key].pop()
else: else:
if op.is_put: if op.is_put:
if op in self._items[op.key]:
# TODO: error
print("!! dup put", op)
# self._items[op.key].remove(op)
# assert op not in self._items[op.key], f"duplicate add for {op}"
stored = self._get(op.key) stored = self._get(op.key)
if stored is not None: if stored is not None:
assert RevertableDelete(op.key, stored) in self._items[op.key], f"db op ties to add on top of existing key={op}" assert RevertableDelete(op.key, stored) in self._items[op.key], f"db op ties to add on top of existing key={op}"
self._items[op.key].append(op) self._items[op.key].append(op)
else: else:
if op in self._items[op.key]:
# TODO: error
print("!! dup delete ", op)
# self._items[op.key].remove(op)
# assert op not in self._items[op.key], f"duplicate delete for {op}"
stored = self._get(op.key) stored = self._get(op.key)
if stored is not None and stored != op.value: if stored is not None and stored != op.value:
assert RevertableDelete(op.key, stored) in self._items[op.key] assert RevertableDelete(op.key, stored) in self._items[op.key]