Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion server/internal/postgresx/acquisition_value_hints.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func (a Acquisition) CompleteValueHint(ctx context.Context, scope collectnative.
}
var retryAt any
if !retry.IsZero() {
retryAt = retry.UTC()
// timestamptz stores microseconds and rounds; truncate so retry_at round-trips exactly.
retryAt = retry.UTC().Truncate(time.Microsecond)
}
result, err := tx.ExecContext(ctx, `UPDATE cao_acquisition_value_hints SET
processed=CASE WHEN $6::timestamptz IS NULL THEN greatest(processed,$4) ELSE processed END,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestNativeValueHintsFenceConcurrentInvalidationAndAcknowledgement(t *testin
if err := a.InvalidateValue(t.Context(), scope); err != nil {
t.Fatal(err)
}
now := time.Now().UTC()
now := time.Now().UTC().Truncate(time.Microsecond)
if err := b.CompleteValueHint(t.Context(), scope, hint.Dirty, now, time.Time{}); err != nil {
t.Fatal(err)
}
Expand Down
Loading