Repository navigation
feat(jobsdb): pending events gauge for the gw jobsdb - #7447
Merged
Merged
Conversation
atzoum
force-pushed
the
feat-gw-pending-events
branch
5 times, most recently
from
October 1, 2026 12:36
8ed3e38 to
2ac0133
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7447 +/- ##
==========================================
- Coverage 85.05% 85.04% -0.01%
==========================================
Files 625 631 +6
Lines 62514 62850 +336
==========================================
+ Hits 53169 53450 +281
- Misses 9342 9397 +55
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
atzoum
force-pushed
the
feat-gw-pending-events
branch
24 times, most recently
from
October 5, 2026 16:31
e3a1cdd to
0e65551
Compare
atzoum
force-pushed
the
feat-gw-pending-events
branch
2 times, most recently
from
October 6, 2026 06:59
0556744 to
928424b
Compare
atzoum
force-pushed
the
feat-gw-pending-events
branch
2 times, most recently
from
October 12, 2026 08:02
1f495e4 to
3619df2
Compare
mihir20
reviewed
Oct 12, 2026
Add a pending-events tracker that decorates the gw reader handle and exports jobsdb_gw_pending_events_count per workspace, source and consumer. Jobs of sealed datasets are counted once and then decremented in memory as their terminal statuses commit; the last dataset is polled, and only when its pg_stat counters changed. A count and the decrements that race with it are reconciled through the count's Postgres snapshot and the transaction id that each status write records. Sealed datasets are counted at most JobsDB.pendingEvents.maxDSPerTransition (default 3) at a time, in back-to-back transitions, so a startup with many datasets never needs one count over all of them. The tracker is disabled by default (JobsDB.gw.pendingEvents.enabled) and enabled in every integration test. The backend config unavailability test scrapes the gauge and expects it to equal the events sent while the transformer cannot run, and zero once they are delivered. PIPE-3461 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rding them An exported gauge keeps reporting its last value for the life of the process, so a reset that swapped in a new registry left the series of a key that drained during the recount at its old value. Reset now zeroes the gauges in place: nothing is exported until the recount completes, and the recount brings every exported key to its exact count, zero for the ones that drained. The registry no longer changes, so mu stops protecting it. PIPE-3461 Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
atzoum
force-pushed
the
feat-gw-pending-events
branch
from
October 13, 2026 09:00
397c031 to
71bb125
Compare
ktgowtham
approved these changes
Oct 13, 2026
…he sealed boundary A compaction between two transitions of a catch-up can leave the sealed boundary below the tracker's boundary. With liveFingerprint still nil, the next transition was never the live one, so the loop repeated empty transitions until a new dataset was sealed. A transition that reaches or passes the sealed boundary now counts the live dataset. PIPE-3461 Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
atzoum
enabled auto-merge (squash)
October 13, 2026 16:07
This was referenced Oct 19, 2026
Closed
mihir20
pushed a commit
that referenced
this pull request
Oct 19, 2026
🤖 I have created a release *beep* *boop* --- ## [1.91.0-rc.1](v1.90.0...v1.91.0-rc.1) (2026-10-19) ### Features * **jobsdb:** pending events gauge for the gw jobsdb ([#7447](#7447)) ([fc539c4](fc539c4)) * **processor:** report event_filter drops per reason and stop its succeeded rows ([#7454](#7454)) ([5caff53](5caff53)) ### Bug Fixes * **processor:** exclude dropped jobs from tracked users and activation records ([#7485](#7485)) ([526602c](526602c)) * **router:** report destination status for v1 proxy deliveries in transformer_outgoing_request_count ([#7482](#7482)) ([bba1c21](bba1c21)) ### Miscellaneous * bump sqlconnect-go to v1.34.0 ([#7479](#7479)) ([71e8cfa](71e8cfa)) * stop setting in_reported_by on report rows ([#7458](#7458)) ([814d149](814d149)) * sync release v1.90.0 to main branch ([#7475](#7475)) ([d05fcbb](d05fcbb)) * **tooling:** move rudder-server test MinIO to Silo ([#7469](#7469)) ([935bf59](935bf59)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
This was referenced Oct 20, 2026
Merged
itsmihir
pushed a commit
that referenced
this pull request
Oct 20, 2026
🤖 I have created a release *beep* *boop* --- ## [1.91.0-rc.2](v1.90.0...v1.91.0-rc.2) (2026-10-20) ### Features * **jobsdb:** pending events gauge for the gw jobsdb ([#7447](#7447)) ([fc539c4](fc539c4)) * **processor:** report event_filter drops per reason and stop its succeeded rows ([#7454](#7454)) ([5caff53](5caff53)) ### Bug Fixes * **destination:** authenticate marketo bulk uploads with bearer token ([#7510](#7510)) ([3eaffad](3eaffad)) * **processor:** exclude dropped jobs from tracked users and activation records ([#7485](#7485)) ([526602c](526602c)) * **router:** enable live events payload masking by default ([#7500](#7500)) ([8b5c22d](8b5c22d)) * **router:** mask multi-request delivery payloads ([#7476](#7476)) ([f65572e](f65572e)) * **router:** mask reporting sample event secrets ([#7497](#7497)) ([833d694](833d694)) * **router:** report destination status for v1 proxy deliveries in transformer_outgoing_request_count ([#7482](#7482)) ([bba1c21](bba1c21)) ### Miscellaneous * bump sqlconnect-go to v1.34.0 ([#7479](#7479)) ([71e8cfa](71e8cfa)) * stop setting in_reported_by on report rows ([#7458](#7458)) ([814d149](814d149)) * sync release v1.90.0 to main branch ([#7475](#7475)) ([d05fcbb](d05fcbb)) * **tooling:** move rudder-server test MinIO to Silo ([#7469](#7469)) ([935bf59](935bf59)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
itsmihir
pushed a commit
that referenced
this pull request
Oct 20, 2026
🤖 I have created a release *beep* *boop* --- ## [1.91.0](v1.90.0...v1.91.0) (2026-10-20) ### Features * **jobsdb:** pending events gauge for the gw jobsdb ([#7447](#7447)) ([fc539c4](fc539c4)) * **processor:** report event_filter drops per reason and stop its succeeded rows ([#7454](#7454)) ([5caff53](5caff53)) ### Bug Fixes * **destination:** authenticate marketo bulk uploads with bearer token ([#7510](#7510)) ([3eaffad](3eaffad)) * **processor:** exclude dropped jobs from tracked users and activation records ([#7485](#7485)) ([526602c](526602c)) * **router:** enable live events payload masking by default ([#7500](#7500)) ([8b5c22d](8b5c22d)) * **router:** mask multi-request delivery payloads ([#7476](#7476)) ([f65572e](f65572e)) * **router:** mask reporting sample event secrets ([#7497](#7497)) ([833d694](833d694)) * **router:** report destination status for v1 proxy deliveries in transformer_outgoing_request_count ([#7482](#7482)) ([bba1c21](bba1c21)) ### Miscellaneous * bump sqlconnect-go to v1.34.0 ([#7479](#7479)) ([71e8cfa](71e8cfa)) * stop setting in_reported_by on report rows ([#7458](#7458)) ([814d149](814d149)) * sync release v1.90.0 to main branch ([#7475](#7475)) ([d05fcbb](d05fcbb)) * **tooling:** move rudder-server test MinIO to Silo ([#7469](#7469)) ([935bf59](935bf59)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
jobsdb_gw_pending_events_count, per workspace, source and consumer, so agwbacklog can be attributed to a source, and, oncegwis multi-consumer, to the processor or the archiver.gwhad no such gauge because its jobs are stored by other processes, which breaks the in-process tracking thatrt/batch_rt/procuse.A new
pendingEventsTrackerdecorates thegwreader handle. It counts the jobs of sealed datasets once and then decrements them in memory as terminal statuses commit, and polls only the last dataset, only when itspg_statcounters changed. A status that commits during a count is subtracted only if the count's postgres snapshot didn't see its transaction. No state is stored in the database, so a restart rebuilds it. It is disabled by default and enabled withJobsDB.gw.pendingEvents.enabled.📐 Design: Pending events gauge for the gateway jobsdb
Linear Ticket
resolves PIPE-3461
Security
🤖 Generated with Claude Code