This commit is contained in:
wangmeihua 2025-10-10 14:39:06 +08:00
parent f1fdb502be
commit 210b77dda7

View File

@ -145,18 +145,6 @@ where a.orgid = b.orgid
"message": f"插入文档失败: {str(e)}",
"timings": timings
})
# 记录回滚日志
rollback_log = {
"transaction_id": transaction_mgr.transaction_id,
"document_id": id,
"realpath": realpath,
"action": "rollback",
"reason": f"插入失败: {str(e)}",
"timestamp": datetime.now().isoformat()
}
with open('/home/wangmeihua/kyrag/logs/rollback.log', 'a') as f:
f.write(f"{json.dumps(rollback_log, ensure_ascii=False)}\n")
# 提供回滚上下文
raise ValueError(str(e)) from e
debug(f"最终结果是:{result}")
return result