Skip to content

chore(jobsdb): refactoring and cleanup - #7043

Merged
atzoum merged 6 commits into
masterfrom
chore.jobsdbRefactor
Jun 9, 2026
Merged

atzoum merged 6 commits into
masterfrom
chore.jobsdbRefactor

Conversation

@atzoum

@atzoum atzoum commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Drop unnecessary prepared statements
  • Remove deprecated StoreEachBatchRetry and other dead code
  • Rename ConnectionDetails → ConnectionID and migration → compaction
  • Prefer new config keys over legacy ones
  • Split code into smaller, logically grouped files
  • Fix stale and missing docs

Linear Ticket

resolves PIPE-3082

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 2 in a stack made with GitButler:

@atzoum
atzoum force-pushed the chore.jobsdbRefactor branch from fe6585e to 4b3cab3 Compare June 3, 2026 08:52
@codecov

codecov Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.24211% with 377 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.45%. Comparing base (02e84e5) to head (3f96771).

Files with missing lines Patch % Lines
jobsdb/jobsdb_dataset_ddl.go 69.31% 56 Missing and 29 partials ⚠️
jobsdb/jobsdb_get.go 87.11% 40 Missing and 19 partials ⚠️
jobsdb/jobsdb_dataset.go 76.00% 32 Missing and 16 partials ⚠️
jobsdb/jobsdb_update.go 86.39% 23 Missing and 17 partials ⚠️
jobsdb/jobsdb_journal.go 67.22% 37 Missing and 2 partials ⚠️
jobsdb/jobsdb_lifecycle.go 86.73% 22 Missing and 17 partials ⚠️
jobsdb/jobsdb_tx.go 71.59% 24 Missing and 1 partial ⚠️
jobsdb/jobsdb_compaction.go 82.25% 15 Missing and 7 partials ⚠️
jobsdb/jobsdb_store.go 88.88% 9 Missing and 6 partials ⚠️
jobsdb/jobsdb_factory.go 90.90% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7043      +/-   ##
==========================================
- Coverage   79.78%   79.45%   -0.34%     
==========================================
  Files         572      581       +9     
  Lines       64927    64788     -139     
==========================================
- Hits        51801    51476     -325     
- Misses      10022    10234     +212     
+ Partials     3104     3078      -26     

☔ 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.

Comment thread jobsdb/jobsdb_dataset_ddl.go Dismissed
Comment thread jobsdb/jobsdb_dataset_ddl.go Dismissed
@atzoum
atzoum marked this pull request as ready for review June 3, 2026 11:43
Comment thread gateway/handle_lifecycle.go Resolved
Comment thread gateway/handle_lifecycle.go Resolved
@atzoum atzoum mentioned this pull request Jun 5, 2026
1 task done
@atzoum
atzoum marked this pull request as draft June 5, 2026 11:44
@atzoum
atzoum force-pushed the chore.jobsdbRefactor branch 5 times, most recently from 1ce828a to 5043625 Compare June 9, 2026 06:12
@atzoum
atzoum marked this pull request as ready for review June 9, 2026 06:22
@atzoum
atzoum force-pushed the chore.jobsdbRefactor branch from 5043625 to 3f96771 Compare June 9, 2026 11:13
@atzoum
atzoum merged commit 2e4ea92 into master Jun 9, 2026
73 checks passed
@atzoum
atzoum deleted the chore.jobsdbRefactor branch June 9, 2026 14:30
atzoum added a commit that referenced this pull request Jun 12, 2026
# Description

First task of the [Destination Isolation in
Processor](https://app.notion.com/p/rudderstacks/Design-Proposal-Destination-Isolation-in-Processor-36cf2b415dd080048ad1eeafd67ac8c6)
effort: **introducing a new intermediate JobsDB (`proc`) for the
processor**.

It will eventually hold the fanned-out, per-destination events drained
by the destination-isolation worker pool. This PR only introduces and
integrates the DB into the app lifecycle, partition migration, and crash
recovery.

Everything is gated behind `Processor.DestinationIsolation.enabled`
(default `false`), so this is currently a no-op in all deployments.

## Changes

- New `proc` JobsDB (with its own `JobsDB.proc.dsLimit`), wrapped with
the pending-events decorator and threaded into processor setup and the
cluster lifecycle.
- Partition migration: `proc` participates via a new `proc_buf`
partition buffer
- Added `PartitionMigration.singleBufferedGroup` configuration option to
collapse buffered DBs into a single group, i.e. flush all buffers in
parallel.
- Crash recovery: `DeleteExecuting()` on the `proc` DB moves `executing`
jobs back to `unprocessed` on restart.

## Linear Ticket

resolves PIPE-3045
resolves PIPE-3046
resolves PIPE-3047

## 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 2 of 2 in a stack** made with GitButler:
- <kbd>&nbsp;2&nbsp;</kbd> #7048 👈 
- <kbd>&nbsp;1&nbsp;</kbd> #7043 
<!-- GitButler Footer Boundary Bottom -->
This was referenced Jun 22, 2026
This was referenced Jun 22, 2026
atzoum pushed a commit that referenced this pull request Jun 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.78.0-rc.1](v1.77.0...v1.78.0-rc.1)
(2026-06-22)


### Features

* add and register bq stream v2 async destination manager
([#7057](#7057))
([787b7ac](787b7ac))
* add BQSTREAM_V2 destination type and bqstreamv2 building blocks
([#7056](#7056))
([02e84e5](02e84e5))
* **batchrouter:** raise getImportingJobs max iterations and remove
payload size limit
([#7076](#7076))
([15707f6](15707f6))
* **gateway:** throttling support for internal batch endpoint
([#7055](#7055))
([6b6ba65](6b6ba65))
* **jobsdb:** introduce compaction min ds age
([#7077](#7077))
([4d6d97a](4d6d97a))
* **processor:** new intermediate jobsdb
([#7048](#7048))
([dfef1f1](dfef1f1))


### Bug Fixes

* abort non-retryable Klaviyo upload errors instead of retrying
([#7085](#7085))
([4c3e4f1](4c3e4f1))
* **batchrouter:** correlate poll results by externalId instead of
whole-row hash
([09326d2](09326d2))
* **batchrouter:** report real status code and sample event for drained
jobs ([#7104](#7104))
([d3fab82](d3fab82))
* internal endpoints enabled in open source version of rudder-server
([#7075](#7075))
([dc071cd](dc071cd))
* **jobsdb:** get jobs lateral join against the v_last view
([#7105](#7105))
([853d14c](853d14c))
* klaviyo upload partial failures
([#7107](#7107))
([37e79e9](37e79e9))
* **router:** shared barrier causing illegal job sequence errors
([#7101](#7101))
([b5435ba](b5435ba))


### Miscellaneous

* add BQSTREAM_V2 integration tests
([#7058](#7058))
([478e217](478e217))
* add rudderai announcement
([#7046](#7046))
([ff02fe8](ff02fe8))
* bump codecov-action to 7.0.0
([#7070](#7070))
([31f0623](31f0623))
* cleanup embedded warehouse transformations
([#7072](#7072))
([31f0623](31f0623))
* **deps:** bump actions/checkout from 6.0.2 to 6.0.3
([#7084](#7084))
([745d5ab](745d5ab))
* **deps:** bump aws-actions/configure-aws-credentials from 6.1.2 to
6.2.0 ([#7081](#7081))
([19251cd](19251cd))
* **jobsdb:** refactoring and cleanup
([#7043](#7043))
([2e4ea92](2e4ea92))
* remove legacy warehouse endpoints
([#7090](#7090))
([6f85153](6f85153))
* rename bqstream all events
([#7088](#7088))
([4d9ad19](4d9ad19))
* **router:** rename experimental buffer size calculator to dynamic
([#7103](#7103))
([52896cd](52896cd))
* support using the full event schema key as pulsar ordering key
([#7086](#7086))
([ff50611](ff50611))

---
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 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.78.0](v1.77.0...v1.78.0)
(2026-06-22)


### Features

* add and register bq stream v2 async destination manager
([#7057](#7057))
([787b7ac](787b7ac))
* add BQSTREAM_V2 destination type and bqstreamv2 building blocks
([#7056](#7056))
([02e84e5](02e84e5))
* **batchrouter:** raise getImportingJobs max iterations and remove
payload size limit
([#7076](#7076))
([15707f6](15707f6))
* **gateway:** throttling support for internal batch endpoint
([#7055](#7055))
([6b6ba65](6b6ba65))
* **jobsdb:** introduce compaction min ds age
([#7077](#7077))
([4d6d97a](4d6d97a))
* **processor:** new intermediate jobsdb
([#7048](#7048))
([dfef1f1](dfef1f1))


### Bug Fixes

* abort non-retryable Klaviyo upload errors instead of retrying
([#7085](#7085))
([4c3e4f1](4c3e4f1))
* **batchrouter:** correlate poll results by externalId instead of
whole-row hash
([09326d2](09326d2))
* **batchrouter:** report real status code and sample event for drained
jobs ([#7104](#7104))
([d3fab82](d3fab82))
* internal endpoints enabled in open source version of rudder-server
([#7075](#7075))
([dc071cd](dc071cd))
* **jobsdb:** get jobs lateral join against the v_last view
([#7105](#7105))
([853d14c](853d14c))
* klaviyo upload partial failures
([#7107](#7107))
([37e79e9](37e79e9))
* **router:** shared barrier causing illegal job sequence errors
([#7101](#7101))
([b5435ba](b5435ba))


### Miscellaneous

* add BQSTREAM_V2 integration tests
([#7058](#7058))
([478e217](478e217))
* add rudderai announcement
([#7046](#7046))
([ff02fe8](ff02fe8))
* bump codecov-action to 7.0.0
([#7070](#7070))
([31f0623](31f0623))
* cleanup embedded warehouse transformations
([#7072](#7072))
([31f0623](31f0623))
* **deps:** bump actions/checkout from 6.0.2 to 6.0.3
([#7084](#7084))
([745d5ab](745d5ab))
* **deps:** bump aws-actions/configure-aws-credentials from 6.1.2 to
6.2.0 ([#7081](#7081))
([19251cd](19251cd))
* **jobsdb:** refactoring and cleanup
([#7043](#7043))
([2e4ea92](2e4ea92))
* remove legacy warehouse endpoints
([#7090](#7090))
([6f85153](6f85153))
* rename bqstream all events
([#7088](#7088))
([4d9ad19](4d9ad19))
* **router:** rename experimental buffer size calculator to dynamic
([#7103](#7103))
([52896cd](52896cd))
* support using the full event schema key as pulsar ordering key
([#7086](#7086))
([ff50611](ff50611))

---
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.

4 participants