Skip to content

fix: stop rewriting unchanged instance_files rows on every content sync - #7561

Open
lbellows wants to merge 1 commit into
modrinth:mainfrom
lbellows:fix/instance-files-idle-rewrite
Open

lbellows wants to merge 1 commit into
modrinth:mainfrom
lbellows:fix/instance-files-idle-rewrite

Conversation

@lbellows

Copy link
Copy Markdown

#7457

sync_instance_content_files stamps every scanned file with modified_at = Utc::now() and upserts it, so a rescan rewrites every row even when the scan found nothing changed. This keeps the stored stamp when the file is unchanged, and skips the upsert when the row already matches.

The content sync stamped every scanned file with modified_at = now and
upserted it, so an idle rescan rewrote every row in the instance even when
nothing on disk had changed. Keep the stored stamp when the file is
unchanged, and skip the upsert when the row already matches.
@github-actions

Copy link
Copy Markdown
Contributor

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant