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

DM-26662: ap_verify import slow in Gen 3 #107

Merged
merged 1 commit into from Oct 6, 2020
Merged

Conversation

kfindeisen
Copy link
Member

This PR creates the ap_verify repository without checksums, to ensure that copying the repository is a fast operation (minutes vs. hours, for large repositories). Testing suggests that daf.butler.Config silently ignores nonexistent keys, so the new code will work for both file-based and non-file datastores. However, this behavior doesn't seem to be documented anywhere.

@kfindeisen kfindeisen requested a review from timj October 6, 2020 21:52
Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Regarding config validation, Config is just a clever dict. It knows nothing about the content. Later on this will be part of a DatastoreConfig that can do validation but will also ignore things it doesn't care about. These are not pex_config. That can be good and it can be bad. In this case it's good because if you end up with an in-memory datastore nothing cares about the weird extra.

python/lsst/ap/verify/dataset.py Outdated Show resolved Hide resolved
repoConfig = dafButler.Butler.makeRepo(repoDir)
initConfig = dafButler.Config()
# Checksums greatly slow importing of large repositories
initConfig[".datastore.checksum"] = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside butler we prefer to write this as initConfig["datastore", "checksum"] rather than relying on the delimiter at all. You can of course keep it with the leading delimiter.

Copy link
Member Author

@kfindeisen kfindeisen Oct 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you prefer that format, consider emphasizing it in the class docs. Right now they focus almost entirely on delimiters, and all the alternatives are presented as if they were equal.

Checksums greatly slow down repository copying, particularly for
large repositories.
@kfindeisen kfindeisen merged commit 8f00335 into master Oct 6, 2020
@kfindeisen kfindeisen deleted the tickets/DM-26662 branch October 6, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants