Skip to content

[v18] Refactor dynamoDB event queries to use proper pagination solution#62890

Merged
kshi36 merged 7 commits intobranch/v18from
bot/backport-62659-branch/v18
Jan 21, 2026
Merged

[v18] Refactor dynamoDB event queries to use proper pagination solution#62890
kshi36 merged 7 commits intobranch/v18from
bot/backport-62659-branch/v18

Conversation

@kshi36
Copy link
Contributor

@kshi36 kshi36 commented Jan 15, 2026

Backport #62659 to branch/v18

This backport includes manual changes to re-add the old pagination solution, in order to read old checkpoints using checkpointKey.EventKey field. While we support reading in EventKey, new checkpoints will not use this field and set checkpoints using checkpointKey.Iterator instead.

changelog: Improved performance of large search queries for DynamoDB event backend

@kshi36 kshi36 requested review from hugoShaka and tigrato January 15, 2026 22:45
@kshi36 kshi36 marked this pull request as ready for review January 15, 2026 22:45
@github-actions github-actions bot requested a review from bernardjkim January 15, 2026 22:46
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log backport size/md labels Jan 15, 2026
Comment on lines -1635 to +1646
if !l.foundStart {
// Support reading old checkpoints that are using checkpointKey.EventKey.
// This field was used to resume processing events after a sub-page break.
// After we begin processing from the correct event,
// new checkpoints will not set EventKey and use Iterator instead.
if l.checkpoint.EventKey != "" {
Copy link
Contributor Author

@kshi36 kshi36 Jan 15, 2026

Choose a reason for hiding this comment

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

Since new checkpoints can resume directly from checkpoint.Iterator, we can change foundStart functionality to simply check if checkpoint.EventKey is populated. As such, we can remove foundStart

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from tigrato January 21, 2026 01:12
@kshi36 kshi36 added this pull request to the merge queue Jan 21, 2026
Merged via the queue into branch/v18 with commit b3ebb27 Jan 21, 2026
44 of 46 checks passed
@kshi36 kshi36 deleted the bot/backport-62659-branch/v18 branch January 21, 2026 17:52
@fheinecke fheinecke mentioned this pull request Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-log Issues related to Teleports Audit Log backport size/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments