Skip to content

chore(jobsdb): new columns for multi-consumer jobsdb - #7082

Merged
atzoum merged 1 commit into
masterfrom
feat.mcJobsDBDDL
Jun 22, 2026
Merged

atzoum merged 1 commit into
masterfrom
feat.mcJobsDBDDL

Conversation

@atzoum

@atzoum atzoum commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds two new columns to all jobsdb tables (jobs and job_status) as the foundational schema step for multi-consumer jobsdb support:

  • consumers on jobs tables — tracks which consumers a job is intended for
  • consumer on job_status tables — identifies which consumer a status row belongs to

Both columns are added universally to all handles (single- and multi-consumer alike), with safe defaults that preserve existing single-consumer semantics. All existing read, write, and compaction paths are updated to carry the new columns through.

Linear Ticket

Resolves PIPE-3115

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

This is part 1 of 5 in a stack made with GitButler:

@atzoum
atzoum requested review from ktgowtham and mihir20 June 12, 2026 06:59
@codecov

codecov Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.52%. Comparing base (b5435ba) to head (77fa128).

Files with missing lines Patch % Lines
jobsdb/jobsdb_dataset_ddl.go 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7082      +/-   ##
==========================================
- Coverage   79.90%   79.52%   -0.39%     
==========================================
  Files         583      583              
  Lines       65273    65278       +5     
==========================================
- Hits        52155    51910     -245     
- Misses      10016    10286     +270     
+ Partials     3102     3082      -20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atzoum
atzoum marked this pull request as draft June 12, 2026 07:54
atzoum added a commit that referenced this pull request Jun 12, 2026
## Description

Without a minimum age guard, newly created datasets, whether written by
normal ingestion or created as a compaction destination, can be picked
up for compaction almost immediately, before workers have had a chance
to process all their jobs. This causes premature I/O churn: jobs get
moved again with little benefit.

This PR introduces `compactionMinDSAge` (default: `2m`):
partially-processed datasets are skipped for compaction until they reach
this minimum age, giving workers a processing window before a dataset
becomes eligible. The age is read from a creation timestamp stored as a
PostgreSQL table comment on each jobs table.

**Fully-processed datasets** and datasets without a recorded creation
time **are unaffected**.

**Config:** `JobsDB.compactionMinDSAge` (reloadable)

## Linear Ticket

resolves PIPE-3114

## Security

- [x] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.

<!-- GitButler Footer Boundary Top -->
---
This is **part 1 of 3 in a stack** made with GitButler:
- <kbd>&nbsp;3&nbsp;</kbd> #7083 
- <kbd>&nbsp;2&nbsp;</kbd> #7082 
- <kbd>&nbsp;1&nbsp;</kbd> #7077 👈 
<!-- GitButler Footer Boundary Bottom -->
Base automatically changed from feat.compactionMinDSAge to master June 12, 2026 13:58
@atzoum
atzoum force-pushed the feat.mcJobsDBDDL branch 2 times, most recently from f0c14c3 to 0502233 Compare June 15, 2026 06:57
@atzoum
atzoum marked this pull request as ready for review June 15, 2026 10:35
@atzoum
atzoum force-pushed the feat.mcJobsDBDDL branch from 0502233 to 231ef95 Compare June 15, 2026 15:28
@ktgowtham

Copy link
Copy Markdown
Contributor

tests are failing

@atzoum
atzoum force-pushed the feat.mcJobsDBDDL branch from 231ef95 to eafa943 Compare June 16, 2026 10:08
@atzoum
atzoum requested review from fracasula and itsmihir June 16, 2026 11:11
@atzoum atzoum changed the title chore(jobsdb): add consumer columns chore(jobsdb): new columns for multi-consumer jobsdb Jun 16, 2026
@atzoum
atzoum force-pushed the feat.mcJobsDBDDL branch 2 times, most recently from 9f5c43d to 9189036 Compare June 17, 2026 08:06
@atzoum

atzoum commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

tests are failing

failures were irrelevant

@atzoum
atzoum force-pushed the feat.mcJobsDBDDL branch from 9189036 to cdcb9a9 Compare June 17, 2026 12:30
@atzoum
atzoum force-pushed the feat.mcJobsDBDDL branch 2 times, most recently from f7113fa to 77fa128 Compare June 22, 2026 07:16

@mihir20 mihir20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@atzoum
atzoum force-pushed the feat.mcJobsDBDDL branch from 77fa128 to a1ff8e6 Compare June 22, 2026 10:53
@atzoum
atzoum merged commit 428c0f9 into master Jun 22, 2026
70 of 72 checks passed
@atzoum
atzoum deleted the feat.mcJobsDBDDL branch June 22, 2026 14:02
atzoum added a commit that referenced this pull request Jun 23, 2026
# Description

Syncing release v1.78.0 to main branch

**WARNING: Do NOT rewrite git history and ALWAYS use a "Merge Commit"
for merging!**

**↓↓ Please review and edit commit overrides before merging ↓↓**

BEGIN_COMMIT_OVERRIDE
feat: support deltalake azure hierarchical namespace folders (#7089)
chore(jobsdb): new columns for multi-consumer jobsdb (#7082)
fix: panic in user transformer client due to timeout doesn't get
recorded by alerts (#7116)
chore(jobsdb): multi-consumer-specific indexes and views (#7093)
END_COMMIT_OVERRIDE
This was referenced Jun 29, 2026
atzoum pushed a commit that referenced this pull request Jun 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.79.0-rc.1](v1.78.0...v1.79.0-rc.1)
(2026-06-29)


### Features

* support compressing payloads in reporting client
([#7124](#7124))
([365b530](365b530))
* support deltalake azure hierarchical namespace folders
([#7089](#7089))
([61b41e4](61b41e4))


### Bug Fixes

* panic in user transformer client due to timeout doesn't get recorded
by alerts
([#7116](#7116))
([61b41e4](61b41e4))
* partition migration restarts server on slow in-progress wait
([#7129](#7129))
([d63d597](d63d597))


### Miscellaneous

* **jobsdb:** capturing multi-consumer pending events
([#7121](#7121))
([dc382f7](dc382f7))
* **jobsdb:** cleanup legacy configuration flags
([#7122](#7122))
([58778d5](58778d5))
* **jobsdb:** multi-consumer compaction
([#7096](#7096))
([57f1ef5](57f1ef5))
* **jobsdb:** multi-consumer get and noresults cache handling
([#7095](#7095))
([9d5c58a](9d5c58a))
* **jobsdb:** multi-consumer get distinct consumers
([#7097](#7097))
([f68a56d](f68a56d))
* **jobsdb:** multi-consumer partition migration
([#7098](#7098))
([9cda68d](9cda68d))
* **jobsdb:** multi-consumer-specific indexes and views
([#7093](#7093))
([61b41e4](61b41e4))
* **jobsdb:** multiconsumer flip, registry table and unionjobsdb
([#7094](#7094))
([9eff2e9](9eff2e9))
* **jobsdb:** new columns for multi-consumer jobsdb
([#7082](#7082))
([61b41e4](61b41e4))
* recreate stale rsources subscription on shared db
([#7108](#7108))
([c59e9e5](c59e9e5))
* use priority pool at migration start while polling for pending jobs
([#7128](#7128))
([254ae15](254ae15))

---
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 Jun 29, 2026
atzoum pushed a commit that referenced this pull request Jun 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.79.0-rc.2](v1.78.0...v1.79.0-rc.2)
(2026-06-29)


### Features

* support compressing payloads in reporting client
([#7124](#7124))
([365b530](365b530))
* support deltalake azure hierarchical namespace folders
([#7089](#7089))
([61b41e4](61b41e4))


### Bug Fixes

* **jobsdb:** compaction panics with pq error column js.consumer does
not exist at position
([#7133](#7133))
([f392a53](f392a53))
* panic in user transformer client due to timeout doesn't get recorded
by alerts
([#7116](#7116))
([61b41e4](61b41e4))
* partition migration restarts server on slow in-progress wait
([#7129](#7129))
([d63d597](d63d597))


### Miscellaneous

* **jobsdb:** capturing multi-consumer pending events
([#7121](#7121))
([dc382f7](dc382f7))
* **jobsdb:** cleanup legacy configuration flags
([#7122](#7122))
([58778d5](58778d5))
* **jobsdb:** multi-consumer compaction
([#7096](#7096))
([57f1ef5](57f1ef5))
* **jobsdb:** multi-consumer get and noresults cache handling
([#7095](#7095))
([9d5c58a](9d5c58a))
* **jobsdb:** multi-consumer get distinct consumers
([#7097](#7097))
([f68a56d](f68a56d))
* **jobsdb:** multi-consumer partition migration
([#7098](#7098))
([9cda68d](9cda68d))
* **jobsdb:** multi-consumer-specific indexes and views
([#7093](#7093))
([61b41e4](61b41e4))
* **jobsdb:** multiconsumer flip, registry table and unionjobsdb
([#7094](#7094))
([9eff2e9](9eff2e9))
* **jobsdb:** new columns for multi-consumer jobsdb
([#7082](#7082))
([61b41e4](61b41e4))
* recreate stale rsources subscription on shared db
([#7108](#7108))
([c59e9e5](c59e9e5))
* use priority pool at migration start while polling for pending jobs
([#7128](#7128))
([254ae15](254ae15))

---
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>
atzoum pushed a commit that referenced this pull request Jun 30, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.79.0](v1.78.0...v1.79.0)
(2026-06-29)


### Features

* support compressing payloads in reporting client
([#7124](#7124))
([365b530](365b530))
* support deltalake azure hierarchical namespace folders
([#7089](#7089))
([61b41e4](61b41e4))


### Bug Fixes

* **jobsdb:** compaction panics with pq error column js.consumer does
not exist at position
([#7133](#7133))
([f392a53](f392a53))
* panic in user transformer client due to timeout doesn't get recorded
by alerts
([#7116](#7116))
([61b41e4](61b41e4))
* partition migration restarts server on slow in-progress wait
([#7129](#7129))
([d63d597](d63d597))


### Miscellaneous

* **jobsdb:** capturing multi-consumer pending events
([#7121](#7121))
([dc382f7](dc382f7))
* **jobsdb:** cleanup legacy configuration flags
([#7122](#7122))
([58778d5](58778d5))
* **jobsdb:** multi-consumer compaction
([#7096](#7096))
([57f1ef5](57f1ef5))
* **jobsdb:** multi-consumer get and noresults cache handling
([#7095](#7095))
([9d5c58a](9d5c58a))
* **jobsdb:** multi-consumer get distinct consumers
([#7097](#7097))
([f68a56d](f68a56d))
* **jobsdb:** multi-consumer partition migration
([#7098](#7098))
([9cda68d](9cda68d))
* **jobsdb:** multi-consumer-specific indexes and views
([#7093](#7093))
([61b41e4](61b41e4))
* **jobsdb:** multiconsumer flip, registry table and unionjobsdb
([#7094](#7094))
([9eff2e9](9eff2e9))
* **jobsdb:** new columns for multi-consumer jobsdb
([#7082](#7082))
([61b41e4](61b41e4))
* recreate stale rsources subscription on shared db
([#7108](#7108))
([c59e9e5](c59e9e5))
* use priority pool at migration start while polling for pending jobs
([#7128](#7128))
([254ae15](254ae15))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants