Make document change-status idempotent for Infinity doc store (#12717)

### What problem does this PR solve?

This PR makes the document change‑status endpoint idempotent under the
Infinity doc store. If a document already has the requested status, the
handler returns success without touching the engine, preventing
unnecessary updates and avoiding missing‑table errors while keeping
responses consistent.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
6ba3i
2026-01-20 19:11:21 +08:00
committed by GitHub
parent 9ebbc5a74d
commit aee9860970
8 changed files with 55 additions and 14 deletions

View File

@ -25,8 +25,7 @@ def add_sessions_with_chat_assistant(request: FixtureRequest, add_chat_assistant
for chat_assistant in chat_assistants:
try:
chat_assistant.delete_sessions(ids=None)
except Exception as e:
print(f"Exception: {e}")
except Exception :
pass
request.addfinalizer(cleanup)
@ -41,8 +40,8 @@ def add_sessions_with_chat_assistant_func(request: FixtureRequest, add_chat_assi
for chat_assistant in chat_assistants:
try:
chat_assistant.delete_sessions(ids=None)
except Exception as e:
print(f"Exception: {e}")
except Exception :
pass
request.addfinalizer(cleanup)