You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a feed has been subscribed successfully, not only it's validations metrics should be up-to-date, but also all caches should be updated.
Observed behavior
Update and subscription are currently done in separate threads. It may happen, that an update for all subscriptions is performed before all feeds are successfully registered. Feeds registered after this run are only updated org.entur.lamassu.feedupdateinterval seconds later.
This behavior does not cause greater issues when feeds are updated in short intervals, as usually the case. However, if org.entur.lamassu.feedupdateinterval is set to a high value, this causes issues.
(We update test system feeds only every n hours to avoid hitting rate limits for some providers for which we only have a single set of credentials we use for prod and test). In such a scenario, the first update may only happen after n hours, if the registration is successful only after the first update was performed.
Version of lamassu used (exact commit hash or JAR name)
set org.entur.lamassu.feedupdateinterval to e.g. 86400
start lamassu
check if all feeds can be retrieved from lamassu. Some migh return http code 502 instead of 200, as they are registered after the first update happened.
(Note: this can be provoked manually, by blocking access to one of the feeds for a few minutes, so lamassu's update happens before the feed is available)
Suggested fix
This issue should be avoided by letting FeedUpdater call GbfsSubscriptionManager.update(subcriptionId) for a newly registered subscription immediately. This method was introduced with entur/gbfs-loader-java#194.
The text was updated successfully, but these errors were encountered:
Expected behavior
After a feed has been subscribed successfully, not only it's validations metrics should be up-to-date, but also all caches should be updated.
Observed behavior
Update and subscription are currently done in separate threads. It may happen, that an update for all subscriptions is performed before all feeds are successfully registered. Feeds registered after this run are only updated
org.entur.lamassu.feedupdateinterval
seconds later.This behavior does not cause greater issues when feeds are updated in short intervals, as usually the case. However, if
org.entur.lamassu.feedupdateinterval
is set to a high value, this causes issues.(We update test system feeds only every n hours to avoid hitting rate limits for some providers for which we only have a single set of credentials we use for prod and test). In such a scenario, the first update may only happen after n hours, if the registration is successful only after the first update was performed.
Version of lamassu used (exact commit hash or JAR name)
8129a3a
Data sets in use (links to GBFS feeds)
/
Command line used to start lamassu
Configuration used
org.entur.lamassu.feedupdateinterval=86400
Steps to reproduce the problem
Suggested fix
This issue should be avoided by letting
FeedUpdater
callGbfsSubscriptionManager.update(subcriptionId)
for a newly registered subscription immediately. This method was introduced with entur/gbfs-loader-java#194.The text was updated successfully, but these errors were encountered: