Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/coze-dev/coze-studio/backend/domain/memory/variables/internal/dal/query"
"github.com/coze-dev/coze-studio/backend/infra/contract/idgen"
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
"github.com/coze-dev/coze-studio/backend/pkg/logs"
"github.com/coze-dev/coze-studio/backend/types/errno"
)

Expand All @@ -50,7 +51,9 @@ func (v *VariablesDAO) DeleteAllVariableData(ctx context.Context, bizType projec

defer func() {
if err != nil {
tx.Rollback()
if e := tx.Rollback(); e != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不打印是不是也没有什么问题,数据提交失败了。 Rollback 成功与否也没那么重要了?

logs.CtxErrorf(ctx, "rollback failed, err=%v", e)
}
}
}()

Expand Down