Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into slog
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Nov 10, 2024
2 parents e7681bd + 2abddbf commit 1bb0532
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions data.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Data struct {
func (d *Data) CopyTo(to *Data) *Data {
to.ID = d.ID
to.Rev = d.Rev
to.Binary = d.Binary
to.B = append(to.B[:0], d.B...)

return to
Expand Down
4 changes: 2 additions & 2 deletions pgdriver/commiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ func (cmtr *Commiter) Do(cmd0 flowstate.Command) error {
if committableStateCtx.Committed.Rev > 0 {
if err := cmtr.q.UpdateState(context.Background(), tx, &nextState); isConflict(err) {
conflictErr.Add(fmt.Sprintf("%T", cmd), committableStateCtx.Current.ID, err)
continue
return conflictErr
} else if err != nil {
return fmt.Errorf("update state: %w", err)
}
} else {
if err := cmtr.q.InsertState(context.Background(), tx, &nextState); isConflict(err) {
conflictErr.Add(fmt.Sprintf("%T", cmd), committableStateCtx.Current.ID, err)
continue
return conflictErr
} else if err != nil {
return fmt.Errorf("insert state: %w", err)
}
Expand Down

0 comments on commit 1bb0532

Please sign in to comment.