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

Add the concept of an object-store UUID to identify it #11

Closed
giovannipizzi opened this issue Apr 13, 2020 · 3 comments · Fixed by #97
Closed

Add the concept of an object-store UUID to identify it #11

giovannipizzi opened this issue Apr 13, 2020 · 3 comments · Fixed by #97
Milestone

Comments

@giovannipizzi
Copy link
Member

E.g. to associate it with an existing DB, or to uniquely refer to it.

This could be generated during the init_container call and then stored in the repository config json

@giovannipizzi
Copy link
Member Author

giovannipizzi commented Jun 19, 2020

Also:

  • add a version of the repository (or of the library that wrote it)
  • during init, make sure the configuration makes sense and there are no unexpected values
  • similarly, during init_container, one should check if the parameters are being changed (and complain if clear is not true?)

@giovannipizzi
Copy link
Member Author

giovannipizzi commented Jul 17, 2020

@sphuber do we want this in AiiDA, so we know we are pointing to the right container? A bit like the UUID for RabbitMQ, or the same for the DB (I don't know if we have one implemented yet).

Also, should it be generated automatically when creating the container, or should it be settable by the user?

@sphuber
Copy link
Contributor

sphuber commented Jul 17, 2020

I don't think it is necessary. We don't have it now, after all, currently we also just have an absolute filepath in the profile pointing to the database. However, it might actually be a useful feature, and will allow us to perform some sanity checks. If we implement this, I would definitely lean to not allowing a user to determine the UUID, we just generate one. For the interface in the disk-objectstore you may want to allow passing in the filepath and the UUID of a container when initializing it and disk-objectstore will then perform the consistency check. I guess the construction of a container would return a UUID then, which we can store in AiiDA's database settings to make the connection when we create a container for a profile the first time

giovannipizzi added a commit to giovannipizzi/disk-objectstore that referenced this issue Aug 27, 2020
This fixes aiidateam#11
I also fixed a bug I discovered, where config values that
were cached but the cache was not cleared when re-initialising the
container.
To reduce the risk of such a problem, I am now only caching the *whole*
configuration dictionary (and not each value), and I don't need to
implement caching anymore for each single config value; and I just
need to clear one variable `self._config` rather than each newly-defined
configuration.

In addition, I add a test to check that re-initialising the container
creates a new container ID (`container.container_id`).
giovannipizzi added a commit to giovannipizzi/disk-objectstore that referenced this issue Aug 27, 2020
This fixes aiidateam#11
I also fixed a bug I discovered, where config values that
were cached but the cache was not cleared when re-initialising the
container.
To reduce the risk of such a problem, I am now only caching the *whole*
configuration dictionary (and not each value), and I don't need to
implement caching anymore for each single config value; and I just
need to clear one variable `self._config` rather than each newly-defined
configuration.

In addition, I add a test to check that re-initialising the container
creates a new container ID (`container.container_id`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants