Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: remove serializable level from transaction (#3984)
Danny Xuba5101654cdc
diff --git a/store/task.go b/store/task.goindex fcddba67ca..6902fb91f0 100644--- a/store/task.go+++ b/store/task.go@@ -422,10 +422,7 @@ func (s *Store) patchTaskRaw(ctx context.Context, patch *api.TaskPatch) (*taskRa// patchTaskRawStatus updates existing task statuses and the corresponding task run statuses atomically.// Returns ENOTFOUND if tasks do not exist.func (s *Store) patchTaskRawStatus(ctx context.Context, patch *api.TaskStatusPatch) ([]*taskRaw, error) {- // Without using serializable isolation transaction, we will get race condition and have multiple task runs inserted because- // we do a read and write on task, without guaranteed consistency on task runs.- // Once we have multiple task runs, the task will get to unrecoverable state because find task run will fail with two active runs.- tx, err := s.db.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable})+ tx, err := s.db.BeginTx(ctx, nil)if err != nil {return nil, FormatError(err)}