Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions mempalace/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,15 @@ def cmd_compress(args):
# Store compressed versions (unless dry-run)
if not args.dry_run:
try:
# Drop and recreate the compressed collection on each run.
# Repeated upserts in chromadb 1.5.8 cause the HNSW link_lists.bin
# sparse file to grow without GC; rebuilding the index from scratch
# each compress run keeps disk size proportional to entry count.
# See #1092 for the broader concurrent-writer report.
try:
backend.delete_collection(palace_path, "mempalace_compressed")
except Exception:
pass
comp_col = backend.get_or_create_collection(palace_path, "mempalace_compressed")
for doc_id, compressed, meta, stats in compressed_entries:
comp_meta = dict(meta)
Expand Down