onebusaway-gtfs-modules icon indicating copy to clipboard operation
onebusaway-gtfs-modules copied to clipboard

Merging already merged feeds may create duplicate IDs

Open hbruch opened this issue 4 years ago • 0 comments

Summary:

Trying to merge multiple regional feeds together with another, already merged feed resulted in duplicate schedule_ids for calendar.txt entries.

Steps to reproduce: Merge a feed with two schedules with IDs T0, a-T0 with another feed with another, different schedule with ID T0.

Expected behavior: Resulting feed has calendar entries with unique IDs.

Observed behavior: Resulting feed has calendar entries with duplicate IDs a-T0.

Root cause This behavior is caused by MergeSupport.renameAgencyAndId which prepends a prefix without further checking for uniqueness which might result in duplicates.

As long as no feed contains IDs starting with single letters followed by a hyphen (e.g. "a-"), this will not cause an issue. However, the documentation should describe this duplicate resolution strategy.

hbruch avatar Mar 16 '20 15:03 hbruch