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

Loose the hashing computing without include core version #6215

Merged

Commits on Apr 16, 2024

  1. Caching: Remove core and plugin information from hash calculation

    When the caching mechanism was first introduced, precaution was taken to
    reduce the chances for false positive cache hits to a miniumum as much
    as possible. For that reason, the version of the package that provides
    the node class was included in the calculation of the hash. This would
    cover `Data` plugins, however, since the `ProcessNode` class is not
    subclassable, there the version information was added slightly
    differently. When a `Process` is run, the `version` attribute was added
    to the attributes of its `ProcessNode` which includes the version of
    `aiida-core` that is currently installed, as well as that of the plugin
    package providing the process plugin.
    
    Now that caching has been battle-tested and shown to be useful in
    practice, this approach turns out to be too limiting. Now, whenever a
    new version of `aiida-core` or a plugin is installed, the associated
    nodes are invalidated as valid cache sources as future node instances
    will have a different hash, merely because the version has changed.
    
    Therefore, the version information is removed from the calculation of
    the hash. The explicit version of the package providing the node class
    that was explicitly added in `NodeCaching.get_objects_to_hash` is
    removed and the `version` attribute is added to the list of
    `_hash_ignored_attributes`.
    unkcpz authored and sphuber committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    2222c65 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f97193 View commit details
    Browse the repository at this point in the history