Skip to content

optimize saved content refresh#312

Merged
disnet merged 2 commits into
mainfrom
push-loovmukqpsor
Jun 26, 2026
Merged

optimize saved content refresh#312
disnet merged 2 commits into
mainfrom
push-loovmukqpsor

Conversation

@disnet

@disnet disnet commented Jun 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

disnet and others added 2 commits June 26, 2026 10:32
The keyset index from migration 0058 changes the implicit row order of
backfillUrlNormalized's unordered SELECT, so a different one of two same-URL
duplicate saves gets keyed. exportNativeSaves then processed the still-null
duplicate first and its UPDATE collided with the already-keyed row on the
unique (user_did, url_normalized) index, failing backing-enable.spec.ts.

- Make the export's url_normalized UPDATE collision-safe (NOT EXISTS guard),
  matching the documented intent of backfillUrlNormalized; the loop's
  alreadyBacked guard still collapses the duplicate to a single member.
- Order backfillUrlNormalized's SELECT by id so which duplicate gets keyed is
  deterministic instead of depending on the query planner's index choice.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@disnet disnet merged commit f547b22 into main Jun 26, 2026
6 checks passed
@disnet disnet deleted the push-loovmukqpsor branch June 26, 2026 19:04
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.

1 participant