Skip to content

Add a hash value for profiles #2025

Closed

Description

@easbar

Right now its very easy to:

  1. setup some profiles and do the import/preparation of the graph data
  2. shut down the server
  3. change the profiles in config.yml again
  4. restart the server but 'forget' deleting the graph-cache folder
  5. get bad routing results because the profiles no longer 'match' the preparations

One easy way to detect this error would be calculating and storing some kind of hash code for each profile.

See this discussion: #1999 (comment)

Activity

  1. easbar commented on May 4, 2020

    @easbar
    MemberAuthor

    This could be a valuable improvement to be included in 1.0?

  2. added this to the 1.0 milestone on May 4, 2020
  3. karussell commented on May 5, 2020

    @karussell
    Member

    Yes, sure. I'll have a look into it!

  4. karussell commented on May 5, 2020

    @karussell
    Member

    Do we need to store and ensure hash values only for every profile listed in profile_lm/ch?

    And can we skip the check for all LM profiles that reuse another preparation?

  5. easbar commented on May 5, 2020

    @easbar
    MemberAuthor

    Do we need to store and ensure hash values only for every profile listed in profile_lm/ch?

    Yes I think so. All we want to do is recognize if a profile that we keep some preparation for was changed (without updating the preparation). And without ch/lm we do not store any kind of prepared data so nothing can go wrong?

    And can we skip the check for all LM profiles that reuse another preparation?

    Hm it could happen that such a profile changes and no longer works for the chosen preparation_profile. Then again we do not do any kind of check whether or not a preparation_profile works for a given profile either.

  6. easbar commented on May 5, 2020

    @easbar
    MemberAuthor

    Hm it could happen that such a profile changes and no longer works for the chosen preparation_profile. Then again we do not do any kind of check whether or not a preparation_profile works for a given profile either.

    Sorry this was probably not very clear. I mean this: We have profile A and calculate landmarks for it and profile B that uses the landmarks we have for profile A as well. If we later change profile A we should get an error (because the hash changed without calculating new landmarks). If we later change profile B it could happen that this is no longer compatible to the landmarks we got for profile A. But then again we never checked that is was compatible before this either.

  7. easbar commented on Apr 4, 2022

    @easbar
    MemberAuthor

    Do we need to store and ensure hash values only for every profile listed in profile_lm/ch?

    Yes I think so. All we want to do is recognize if a profile that we keep some preparation for was changed (without updating the > preparation). And without ch/lm we do not store any kind of prepared data so nothing can go wrong?

    I think we have to be more strict now, because of the subnetwork encoded values. We only run the subnetwork search when we do the initial import. So if we changed the profiles later we would have to re-run the subnetwork search. The easiest thing we can do is just not allowing changes of the profiles at all.
    Note that we already do not allow adding or removing profiles, because of our check for the encoded values. If we add/remove profiles (or rename them) the encoded value string changes and we get an error when trying to load the graph. But if we modify a profile while keeping the name we potentially calculate routes using a subnetwork encoded value that does not match the changed profile.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions