Skip to content

Commit

Permalink
fix(common): load existing zodb checkpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhongshu123 committed Dec 16, 2024
1 parent 5a9c73e commit 8f61b2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kag/common/checkpointer/bin_checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def open(self):
storage = FileStorage(self._ckpt_file_path)
db = DB(storage)
with db.transaction() as conn:
conn.root.data = BTrees.OOBTree.BTree()
if not hasattr(conn.root, "data"):
conn.root.data = BTrees.OOBTree.BTree()
return db

def read_from_ckpt(self, key):
Expand Down

0 comments on commit 8f61b2a

Please sign in to comment.