Skip to content

fix: speed up and checkpoint deletion of deprecated GBFS feeds - #1885

Merged
davidgamez merged 1 commit into
mainfrom
fix/gbfs-deprecate-feeds-slow-delete
Nov 10, 2026
Merged

davidgamez merged 1 commit into
mainfrom
fix/gbfs-deprecate-feeds-slow-delete

Conversation

@davidgamez

Copy link
Copy Markdown
Member

Summary:

Fixes #1870. Deprecated GBFS feeds were never deleted: each cascaded delete took 20-90s because three foreign key columns are not indexed, and all deletes ran in one transaction that rolled back when the connection dropped after about 53 min.

  • Add indexes on gbfsnotice.validation_report_id, gbfsendpointhttpaccesslog.gbfs_endpoint_id and gbfsfeedhttpaccesslog.gbfs_feed_id.
  • Commit after each deleted feed in deprecate_feeds.

Expected behavior:

Feeds removed from systems.csv (e.g. gbfs-dott-klagenfurt) are deleted, and a failed run keeps its progress.

Testing tips:

Remove a system from systems.csv, run scripts/populate-db.sh <systems.csv> gbfs, and check that the feed is gone.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@davidgamez davidgamez changed the title fix slow gbfs removals fix: speed up and checkpoint deletion of deprecated GBFS feeds Nov 3, 2026
@davidgamez
davidgamez marked this pull request as ready for review November 3, 2026 20:33
@emmambd
emmambd requested a review from cka-y November 4, 2026 15:19
@davidgamez
davidgamez requested a review from ianktc November 9, 2026 16:38
@emmambd

emmambd commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Once this is merged, we can safely up the homepage count from 6000 feeds to 7000. cc @Alessandro100

@cka-y cka-y 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

@davidgamez
davidgamez force-pushed the fix/gbfs-deprecate-feeds-slow-delete branch from dfe473e to 700f1ab Compare November 10, 2026 17:56
@davidgamez
davidgamez merged commit 6b12f96 into main Nov 10, 2026
24 of 25 checks passed
@davidgamez
davidgamez deleted the fix/gbfs-deprecate-feeds-slow-delete branch November 10, 2026 18:02
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.

GBFS feeds not deleted

3 participants