Skip to content

Commit 18eaa8a

Browse files
committed
chore: clarify step 11 comment for normal vs batch mode
1 parent 2330ec5 commit 18eaa8a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lightrag/lightrag.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3961,10 +3961,11 @@ async def adelete_by_doc_id(
39613961
) from e
39623962

39633963
# 11. Delete original document and status.
3964-
# doc_status is deleted first so that if full_docs.delete fails, a retry
3965-
# finds no doc_status record and treats the document as already gone.
3966-
# When skip_rebuild is set the caller handles a deferred rebuild that may
3967-
# fail -- keep doc_status alive so the user can re-trigger deletion later.
3964+
# Normal mode: doc_status is deleted first so that if full_docs.delete
3965+
# fails, a retry finds no doc_status record and treats the doc as gone.
3966+
# Batch mode (skip_rebuild): doc_status stays alive because the caller
3967+
# still needs to do a deferred rebuild that might fail. If it does fail,
3968+
# having doc_status around means the user can just re-trigger deletion.
39683969
try:
39693970
deletion_stage = "delete_doc_entries"
39703971
in_final_delete_stage = True

0 commit comments

Comments
 (0)