Repository navigation
chore: sync release v1.75.3 to main branch - #6985
Merged
atzoum merged 8 commits intoMay 20, 2026
Merged
Conversation
# Description
When a job is drained in the batch router's `scheduleJobs` (job expired,
source not found, destination disabled, etc.), the `ErrorResponse`
written to `job_status` was synthesized from an empty `{}` with just
`{"reason": "<drain reason>"}`, e.g.
```json
{ "reason": "job expired" }
```
Any upstream error from the previous delivery attempt that lived on
`job.LastJobStatus.ErrorResponse` — fields like `error`, `response`,
`firstAttemptedAt` — was clobbered, so by the time a job reached status
`Aborted` with code `410` we'd lost all the context about *why* it had
been failing.
### Change
In `router/batchrouter/worker.go`, base the drained status's
`ErrorResponse` on `job.LastJobStatus.ErrorResponse` instead of
`[]byte("{}")`. `routerutils.EnhanceJSON` then merges the new `reason`
field into the existing object rather than replacing it.
```diff
- ErrorResponse: routerutils.EnhanceJSON([]byte(`{}`), "reason", finalReason),
+ errResponse := routerutils.EnhanceJSON(job.LastJobStatus.ErrorResponse, "reason", finalReason)
+ ErrorResponse: errResponse,
```
After the fix, a drained job's `ErrorResponse` carries the prior
upstream context alongside the drain reason:
```json
{
"error": "500 internal server error",
"response": "upstream timed out",
"firstAttemptedAt": "2024-01-01T00:00:00.000Z",
"reason": "job expired"
}
```
`ErrorCode` stays `410` and `JobState` stays `Aborted` — no change to
drain semantics, only what we surface to debuggers and downstream
reporting.
### Tests
New file `router/batchrouter/worker_test.go` with
`TestScheduleJobsDrainBranch` covering three cases against a real
`scheduleJobs` call (mocked `jobsDB`, fake drainer):
1. **`preserves prior LastJobStatus error fields and stamps the drain
reason`** — the bug-fix path. A job with a prior
`{"error":"…","response":"…","firstAttemptedAt":"…"}` is drained;
asserts all three fields survive and `reason` is stamped on top.
2. **`synthesizes reason when LastJobStatus has no prior error
response`** — first-attempt jobs (empty `LastJobStatus.ErrorResponse`)
still end up with `{"reason":"job expired"}`. No regression on the
existing behavior.
3. **`uses source_not_found reason when the job's source is missing from
the destination`** — the second branch of the same drain condition
(`!sourceFound`) also benefits from the fix; the prior error is
preserved alongside `reason: "source_not_found"`.
## Linear Ticket
- Resolves INT-6358, INT-6356, INT-6349.
## 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.
---------
Co-authored-by: Akash <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.75.1](v1.75.0...v1.75.1) (2026-05-15) ### Bug Fixes * **batchrouter:** preserve prior LastJobStatus error on drain ([#6958](#6958)) ([eaabb87](eaabb87)) --- 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>
# Description Add support for quarterly partitioning in ClickHouse destinations using \`toStartOfQuarter(received_at)\` as the partition expression. ## Changes - \`clickhouse.go\`: Added \`case \"quarter\"\` to \`partitionExpr()\` returning \`toStartOfQuarter(received_at)\` - \`partition_test.go\`: Added unit test case for \`\"quarter\"\` partition type - \`clickhouse_test.go\`: Added integration test case verifying \`toStartOfQuarter(received_at)\` partition key in \`system.tables\` ## Linear Ticket - Resolves INT-6377 ## Security - [ ] The code changed/added as part of this pull request won't create any security issues with how the software is being used. Co-authored-by: Akash Chetty <[email protected]>
🔒 Scanned for secrets using gitleaks 8.29.1 # Description - Fixes offset-based duplicate detection for Snowpipe Streaming when `SnowpipeStreaming.bulkStatusEnabled `is on. Duplicate checks now use the bulk status API (with a single pre-fetch per upload) instead of per-channel GetStatus calls. ## Linear Ticket - Resolves INT-6378 ## Security - [ ] The code changed/added as part of this pull request won't create any security issues with how the software is being used. --------- Co-authored-by: Akash Chetty <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.75.2](v1.75.1...v1.75.2) (2026-05-19) ### Bug Fixes * clickhouse quarter partition type ([#6965](#6965)) ([e4ebe9c](e4ebe9c)) * snowpipe streaming bulk status offset ([#6966](#6966)) ([1f2a141](1f2a141)) --- 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>
# Description The backend config cache persists the workspace config to postgres on every config update. On every update the row was rewritten regardless of whether the config value had actually changed or not. In postgres an `UPDATE` always writes a new tuple version — even when the new values equal the old ones — leaving the previous one dead; and since the large `config` value lives in TOAST, each rewrite churns the TOAST table too. This becomes pathological when: - **There are a lot of continuous configuration changes**: every change is another full-row rewrite. - **Multiple pods try to cache the same config**: each pod independently writes the same config to the same row, so a single logical change becomes one write per pod, most of them re-writing a value identical to what another pod just stored. Dead tuples accumulated faster than autovacuum reclaimed them, steadily bloating postgres disk usage. ### Changes - **Conditional upsert via content hash** — a new `config_hash` column stores a SHA-256 hex digest of the marshalled config. The upsert now carries `WHERE config_cache.config_hash IS DISTINCT FROM excluded.config_hash`, so when the stored config is already identical the row is not rewritten and `updated_at` is not bumped. This de-duplicates both no-op updates and redundant cross-pod writes. - **Skip redundant work** — `set` does a cheap `SELECT config_hash` first and returns early on a match, so a pod that finds the config already cached skips encrypting and transferring the large config blob entirely. - **Debounce writes** — a burst of config updates is coalesced into a single write per pod, controlled by `BackendConfig.dbCacheWriteDebounce` (default `10s`). - **Aggressive TOAST autovacuum** — the migration tunes `config_cache` so dead tuples from any remaining rewrites are reclaimed promptly (`toast.autovacuum_vacuum_scale_factor = 0`, `toast.autovacuum_vacuum_threshold = 1`). ## Linear Ticket resolves PIPE-3018 ## 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. Co-authored-by: Aris Tzoumas <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.75.3](v1.75.2...v1.75.3) (2026-05-20) ### Bug Fixes * continuous backend config cache cause postgres disk bloat ([#6983](#6983)) ([398f902](398f902)) --- 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>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6985 +/- ##
==========================================
+ Coverage 79.66% 80.07% +0.41%
==========================================
Files 565 565
Lines 63712 63748 +36
==========================================
+ Hits 50757 51048 +291
+ Misses 9942 9670 -272
- Partials 3013 3030 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…9a6f784dc7b8024aa7e994f63fc3561d1e 🔒 Scanned for secrets using gitleaks 8.30.1
atzoum
approved these changes
May 20, 2026
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
Syncing patch release v1.75.3 to main branch
↓↓ Please review and edit commit overrides before merging ↓↓
BEGIN_COMMIT_OVERRIDE
fix: continuous backend config cache cause postgres disk bloat (#6983)
END_COMMIT_OVERRIDE