Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScheduleStopPair Direct Import #277

Merged
merged 50 commits into from
Feb 16, 2016
Merged

ScheduleStopPair Direct Import #277

merged 50 commits into from
Feb 16, 2016

Conversation

drewda
Copy link
Member

@drewda drewda commented Dec 23, 2015

(PR comment by @irees)
This PR creates a fast-path for SSP imports.

Currently, SSPs go through Changesets, and are applied one-at-a-time. This change allows SSPs to be inserted directly, using multirow inserts to process 1000 at a time. Additionally, SSPs are now directly associated with Feed/FeedVersions, instead of going through the EIFF table. This results in a substantial performance improvement.

The db:migrate:migrate_eiff_ssp task runs a migration to move the Feed/FeedVersion associations from EIFFs to the SSPs, and then delete the EIFFs.

Finally, the 'active' column is dropped for SSPs, eliminating the costly and error-prone feed version activation changeover process. This is now handled by querying against Feed active_feed_versions.

One forward looking feature is to tag each FeedVersion with an import_level, which can be used to specify whether a feed is registry-only (0), schedule imported (2), available to valhalla (4), etc.

SSP includes two additional scopes: where_active, and where_import_level.

Resolves #319
Resolves #392

@irees
Copy link
Member

irees commented Jan 28, 2016

Updated from master; working on imported_from_feed issues...

@irees irees changed the title use bulk import to speed up application of ScheduleStopPair changesets ScheduleStopPair Bulk Import Feb 11, 2016
@irees
Copy link
Member

irees commented Feb 16, 2016

See updated PR body.

@irees irees changed the title ScheduleStopPair Bulk Import ScheduleStopPair Direct Import Feb 16, 2016
irees added a commit that referenced this pull request Feb 16, 2016
@irees irees merged commit 986e209 into master Feb 16, 2016
@irees irees removed the ready label Feb 16, 2016
@drewda drewda deleted the ssp-bulk-import-2 branch February 23, 2016 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants