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

Archive: Respect filter_size in query for existing nodes #6404

Merged
merged 1 commit into from
May 21, 2024

Commits on May 20, 2024

  1. Archive: Respect filter_size in query for existing nodes

    The `QueryParams` dataclass defines the `filter_size` attribute which is
    used in all queries to limit the number of parameters used in a query.
    This is necessary because without it, large archives would result in
    queries with a lot of parameters which can cause exceptions in database
    backends, such as SQLite, which define a limit of 1000 by default.
    
    The `aiida.tools.archive._import_nodes` function was not respecting this
    setting when determining the set of nodes from the archive that already
    exist in the target storage. This would result in an exception when
    trying to import a large archive into a storage using SQLite. The
    problem is fixed by using the `batch_iter` utility to retrieve the
    existing UUIDs in batches of size `filter_size`.
    sphuber committed May 20, 2024
    Configuration menu
    Copy the full SHA
    b81ed20 View commit details
    Browse the repository at this point in the history