fix: mark knowledge delete failures after retry exhaustion

This commit is contained in:
langcaiye
2026-06-16 12:08:00 +08:00
committed by lyingbug
parent 6efd2093f5
commit 0c3d45d3cd
6 changed files with 120 additions and 0 deletions
+3
View File
@@ -230,6 +230,9 @@ type KnowledgeRepository interface {
// statement so callers that flip several related fields (e.g. parse_status +
// error_message) cannot leave the row in a half-updated state.
UpdateKnowledgeColumns(ctx context.Context, id string, values map[string]interface{}) error
// UpdateActiveDeletingKnowledgeColumns updates an active, non-deleted knowledge row
// only when it is still in the transient deleting state.
UpdateActiveDeletingKnowledgeColumns(ctx context.Context, id string, values map[string]interface{}) (bool, error)
// FinalizeSubtask atomically decrements pending_subtasks_count for the
// given knowledge and promotes parse_status from "finalizing" to
// "completed" when the count reaches zero. Returns the post-decrement