Skip to content

Relay duplicates the miscalibrated publish-latency constant from the reconcile scheduler #30

Description

@raisedadead

Summary

internal/worker/relay.go:19-24 defines relayTimeoutFloor = 4s / relayTimeoutPerItem = 150ms, an independent copy of the same constants in cmd/artemis/gcworkflows.go:75-80. Both encode the same assumption about Hatchet publish latency, and that assumption is wrong (see #1).

Impact

With Batch: 100 (cmd/artemis/main.go), the relay ceiling is 4s + 100*150ms = 19s for up to 100 publishes. At the publish latency implied by #1, a backlog beyond roughly 40 events cannot drain within one tick and the batch times out mid-flight.

Latent today — the production outbox is drained — but it is the same bug as #1 waiting on a queue depth that has not happened yet.

Fix direction

  • Derive both budgets from one shared, documented constant rather than two hand-copied pairs.
  • Pin the value with a test asserting it against a measured publish latency, so the next latency regression fails CI instead of silently truncating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions