Skip to content

fix: rsources failed-records pagination drops records across failed-key boundaries - #7329

Merged
atzoum merged 1 commit into
masterfrom
fix/rsources-failed-records-keyset-pagination
Sep 1, 2026
Merged

atzoum merged 1 commit into
masterfrom
fix/rsources-failed-records-keyset-pagination

Conversation

@atzoum

@atzoum atzoum commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

GetFailedRecords paginates with r.id >= $2 AND r.record_id > $3, which applies the record_id bound to every failed key, not just the cursor's: any record in a later key whose record_id sorts at or below the cursor is silently dropped from all subsequent pages. Fixed by using a row-value comparison, (r.id, r.record_id) > ($2, $3), which selects exactly the rows after the cursor in the query's ORDER BY (id, record_id). Added a regression test paging a job run with two failed keys holding overlapping record ids.

Note

In practice this has not been an issue so far, since retl uses one job run id and one task run id per sync.

Security

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

🤖 Generated with Claude Code

@atzoum
atzoum force-pushed the fix/rsources-failed-records-keyset-pagination branch from d477db3 to 71662aa Compare September 1, 2026 09:12
…et cursor

Co-Authored-By: Claude Fable 5 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.30.1
@atzoum
atzoum force-pushed the fix/rsources-failed-records-keyset-pagination branch from 71662aa to 9c2e483 Compare September 1, 2026 09:14
@atzoum atzoum changed the title fix(rsources): failed-records pagination drops records across failed-key boundaries fix: rsources failed-records pagination drops records across failed-key boundaries Sep 1, 2026

@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

@codecov

codecov Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.77%. Comparing base (e7e50b5) to head (9c2e483).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7329      +/-   ##
==========================================
- Coverage   79.84%   79.77%   -0.07%     
==========================================
  Files         611      611              
  Lines       68316    68316              
==========================================
- Hits        54545    54498      -47     
- Misses      10566    10602      +36     
- Partials     3205     3216      +11     

☔ 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 merged commit 0a50439 into master Sep 1, 2026
120 of 123 checks passed
@atzoum
atzoum deleted the fix/rsources-failed-records-keyset-pagination branch September 1, 2026 13:45
This was referenced Sep 7, 2026
mihir20 pushed a commit that referenced this pull request Sep 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.86.0-rc.1](v1.85.0...v1.86.0-rc.1)
(2026-09-07)


### Features

* backend config v2-to-v1 mapper
([#7315](#7315))
([887f6d2](887f6d2))
* **core:** capture the final recorded error for failed rETL records
([#7295](#7295))
([f4dc4d9](f4dc4d9))
* per-destination visibility at the destination-filter boundary
([#7283](#7283))
([3d83f02](3d83f02))
* user_suppression counter via suppressed dummy jobs
([#7325](#7325))
([77d3d37](77d3d37))
* **warehouse:** support jsonPaths for gcs datalake
([#7333](#7333))
([e714140](e714140))


### Bug Fixes

* rsources failed-records pagination drops records across failed-key
boundaries
([#7329](#7329))
([0a50439](0a50439))
* **warehouse:** stop logging full schemas on table-level schema
mismatch
([#7339](#7339))
([f244c14](f244c14))
* **warehouse:** upgrade clickhouse v2 driver
([#7332](#7332))
([e2c5cb9](e2c5cb9))


### Miscellaneous

* **ci:** remove unused Snyk policy file (SEC-409)
([#7317](#7317))
([d60b3c6](d60b3c6))
* make reporting 413 handling unconditional
([#7313](#7313))
([d2474e9](d2474e9))
* moving pyt contract tests
([#7327](#7327))
([8316af2](8316af2))
* **processor:** pipeline attribution in processor stats
([#7326](#7326))
([3e97f7c](3e97f7c))
* skip consent and connection-mode filtering for replays of non-existent
connections
([#7323](#7323))
([d2474e9](d2474e9))

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


##
[1.86.0](v1.85.0...v1.86.0)
(2026-09-07)


### Features

* backend config v2-to-v1 mapper
([#7315](#7315))
([887f6d2](887f6d2))
* **core:** capture the final recorded error for failed rETL records
([#7295](#7295))
([f4dc4d9](f4dc4d9))
* per-destination visibility at the destination-filter boundary
([#7283](#7283))
([3d83f02](3d83f02))
* user_suppression counter via suppressed dummy jobs
([#7325](#7325))
([77d3d37](77d3d37))
* **warehouse:** support jsonPaths for gcs datalake
([#7333](#7333))
([e714140](e714140))


### Bug Fixes

* rsources failed-records pagination drops records across failed-key
boundaries
([#7329](#7329))
([0a50439](0a50439))
* **warehouse:** stop logging full schemas on table-level schema
mismatch
([#7339](#7339))
([f244c14](f244c14))
* **warehouse:** upgrade clickhouse v2 driver
([#7332](#7332))
([e2c5cb9](e2c5cb9))


### Miscellaneous

* **ci:** remove unused Snyk policy file (SEC-409)
([#7317](#7317))
([d60b3c6](d60b3c6))
* make reporting 413 handling unconditional
([#7313](#7313))
([d2474e9](d2474e9))
* moving pyt contract tests
([#7327](#7327))
([8316af2](8316af2))
* **processor:** pipeline attribution in processor stats
([#7326](#7326))
([3e97f7c](3e97f7c))
* skip consent and connection-mode filtering for replays of non-existent
connections
([#7323](#7323))
([d2474e9](d2474e9))

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