-
Notifications
You must be signed in to change notification settings - Fork 14
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-40053: Add Datastore records to DatasetRef and use them in butler.get #875
Commits on Oct 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for ec466a6 - Browse repository at this point
Copy the full SHA ec466a6View commit details -
Reimplement Butler.get with datastore records from registry.
There are few changes in Registry and Datastore classes that reduce use of the bridge and opaque tables by datastores: - New method `Datastore.get_opaque_table_definitions` returns opaque table definitoons which are used by Registry method `make_datastore_tables` to create those tables. - `Registry.findDataset` has an option to retrieve datastore records and attach them to returned ref. - `Datastore.get` can use the datastore records from the ref instead of using opaque tables. Note that `Datastore.get` can still work with refs that don't have datastore records, this is mostly to keep the unit tests running, a future commit will remove that option and update all unit tests.
Configuration menu - View commit details
-
Copy full SHA for 3abade0 - Browse repository at this point
Copy the full SHA 3abade0View commit details -
Re-implement
Butler.put
with datastore records saved by Registry.Adds `Datastore.put_new`, we want to keep old `Datastore.put` to keep unit tests running (no unit tests for `put_new()` yet). `put_new()` returns DatasetRef with datastore records, and new Registry method is called by Butler to store those records in database. Better approach would be for Registry to store datastore records in `insertDatasets`/`_importDatasets` but that needs a bit of code re-arrangement, will do that later.
Configuration menu - View commit details
-
Copy full SHA for 8184c02 - Browse repository at this point
Copy the full SHA 8184c02View commit details -
Remove dataset_id from
StoredDatastoreItemInfo
class.This is to make it more similar to the `OpaqueTableValues` in DMTN-249 prototype. The `DatasetDatastoreRecords` type alias is similar to `OpaqueTableBatch` from prototype. `StoredDatastoreItemInfo` is always used with its corresponding `DatasetRef` or `DatasetId`, so keeping dataset_id in each record is wasteful.
Configuration menu - View commit details
-
Copy full SHA for 4857945 - Browse repository at this point
Copy the full SHA 4857945View commit details -
Configuration menu - View commit details
-
Copy full SHA for dbec173 - Browse repository at this point
Copy the full SHA dbec173View commit details -
Add do-nothing implementation of new methods to remote registry.
This is only to suppress errors in the tests.
Configuration menu - View commit details
-
Copy full SHA for a75ee01 - Browse repository at this point
Copy the full SHA a75ee01View commit details -
Rename OpaqueTableDefinition to DatastoreOpaqueTable
Old name was too generic, in reality this is very datastore-specific. I do not think we need generic structure of the same kind, at least not right now.
Configuration menu - View commit details
-
Copy full SHA for 9e125f9 - Browse repository at this point
Copy the full SHA 9e125f9View commit details -
Make datastore records private attribute of DatasetRef.
Jim suggested that we use new `OpaqueRecordSet` class to keep datastore records, but after discussion we figured it would requre lots of additional structure to support it. For now there is no clear need for that class and we can continue using `StoredDatastoreItemInfo` in DatasetRefs, but want to make records private to give us freedom to change it later.
Configuration menu - View commit details
-
Copy full SHA for c4d1594 - Browse repository at this point
Copy the full SHA c4d1594View commit details -
Make FileDatastore to ignore datastore records in some cases.
Datastore records in DatasetRef can become invalidated in some cases, this is mostly true for our unit tests that do crazy things to test consistency. This patch adds a flag parameter to some methods that tells them to ignore ref-supplied datastore records.
Configuration menu - View commit details
-
Copy full SHA for b63364f - Browse repository at this point
Copy the full SHA b63364fView commit details -
Revert implementation of
Butler.put
that usedDatastore.put_new
.After trying to re-implement datastore unit tests I realized that the `Datastore.put_new` and `Registry.store_datastore_records` combination (used to implement `Butler.put`) is not very compatible with transaction rollback system that we now have in place. So I decided to keep `Butler.put` unchanged for now until we do something more drastic with transactions. I keep `Datastore.put_new` and `Registry.store_datastore_records` implementations, they are not used but may be useful in the future.
Configuration menu - View commit details
-
Copy full SHA for 19ac7b3 - Browse repository at this point
Copy the full SHA 19ac7b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d147228 - Browse repository at this point
Copy the full SHA d147228View commit details -
Co-authored-by: Jim Bosch <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2a1b9c1 - Browse repository at this point
Copy the full SHA 2a1b9c1View commit details