参数化数据库复制并记录资源清理失败

This commit is contained in:
xuans committed 2026-09-21 00:47:38 +08:00
1 parent 3e135e2b7b
commit aa351dcb9d
10 files changed
+129 -38

No files matched your search

+2 -3
View File
@@ -37,10 +37,9 @@ func (s *TransactionStore) lockState() (func(), error) {
}
unlock, err := lockStateFile(file)
if err != nil {
file.Close()
return nil, errors.New("配置状态正在被其他进程使用,请稍后重试")
return nil, errors.Join(errors.New("配置状态正在被其他进程使用,请稍后重试"), file.Close())
}
return func() { unlock(); file.Close() }, nil
return func() { releaseConfigLease(unlock, file) }, nil
}
func (s *TransactionStore) saveState(kind, id string, record stateRecord) error {