You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Batch (and Transaction) dataset_id should match that of Key / Query objects when added #447
Do not ask for dataset_id in the constructor and instead gather it from the keys and queries used in the transaction.
This may require implementing #495 and will require removing the self.begin()call from Transaction.__enter__. (Can't begin until a query or entity is encountered.)
Title was: "Transaction does not rollback correctly when multiple datasets involved"
UPDATE: This is because the transaction ignores the dataset associated with e2. To see this, we use the key
<Key[{'kind': 'foo', 'id': 2}]>
in two different datasets and delete the one from dataset2 in the transaction for dataset1. After doing this, we check if that key still exists in dataset1 (it should) and dataset2 (it should, but because the transaction failed since two different datasets were used).
changed the title [-]Transaction does not rollback correctly when multiple datasets involved[/-][+]Transaction dataset_id should come from Key / Query involved[/+]on Jan 7, 2015
changed the title [-]Transaction dataset_id should come from Key / Query involved[/-][+]Transaction dataset_id should come from Key / Query objects involved[/+]on Jan 7, 2015
changed the title [-]Transaction dataset_id should come from Key / Query objects involved[/-][+]Batch (and Transaction) dataset_id should come from Key / Query objects involved[/+]on Jan 9, 2015
Note that calling beginTransaction requires the dataset ID (we can't do the RPC without it). We already made the dataset ID optional, falling back to the implicit one, but we cannot possibly rely on the keys, because we don't know them yet when we start the transaction.
I think it would be reasonable to say that users who don't want to use the implicit dataset ID know that when they create the batch / transaction, and can easily pass it. We would then change the code in put / delete to reject any key not matching the one set in __init__.
changed the title [-]Batch (and Transaction) dataset_id should come from Key / Query objects involved[/-][+]Batch (and Transaction) dataset_id should match that of Key / Query objects when added[/+]on Jan 15, 2015
Activity
dhermes commentedon Dec 19, 2014
UPDATE: This is because the transaction ignores the
datasetassociated withe2. To see this, we use the keyin two different datasets and delete the one from
dataset2in the transaction fordataset1. After doing this, we check if that key still exists indataset1(it should) anddataset2(it should, but because the transaction failed since two different datasets were used).[-]Transaction does not rollback correctly when multiple datasets involved[/-][+]Transaction dataset_id should come from Key / Query involved[/+][-]Transaction dataset_id should come from Key / Query involved[/-][+]Transaction dataset_id should come from Key / Query objects involved[/+][-]Transaction dataset_id should come from Key / Query objects involved[/-][+]Batch (and Transaction) dataset_id should come from Key / Query objects involved[/+]tseaver commentedon Jan 15, 2015
Note that calling
beginTransactionrequires the dataset ID (we can't do the RPC without it). We already made the dataset ID optional, falling back to the implicit one, but we cannot possibly rely on the keys, because we don't know them yet when we start the transaction.I think it would be reasonable to say that users who don't want to use the implicit dataset ID know that when they create the batch / transaction, and can easily pass it. We would then change the code in
put/deleteto reject any key not matching the one set in__init__.dhermes commentedon Jan 15, 2015
Yes I also came to this conclusion. Implicit saves us.
This re-opens the question about reading the dataset ID from every single key via
_get_dataset_id_from_keys.[-]Batch (and Transaction) dataset_id should come from Key / Query objects involved[/-][+]Batch (and Transaction) dataset_id should match that of Key / Query objects when added[/+]dhermes commentedon Jan 15, 2015
@tseaver I renamed to reflect the change.
Do you want to tackle this or should I?
tseaver commentedon Jan 15, 2015
I'll take it.
Add bucket properties to support retention policy feature. (#447)
17 remaining items
docs: deprecate extra field to avoid confusion (#447)
fix(deps): require google-api-core>=1.32.0,>=2.8.0 (#447)
chore: use gapic generator python 1.4.1 (#447)
chore(deps): update dependency pytest to v7.2.0 (#447)
feat: added Speech-to-Text V2 API (#447)
chore(deps): update dependency ipython to v8.3.0 (#447)
chore(deps): update dependency ipython to v8.3.0 (#447)
chore: add py.typed file for PEP 561 compatibility (#447)
chore(deps): update dependency google-api-core to v1.20.0 (#447)
feat: add json_fields extras argument for adding to jsonPayload (#447)
fix: strip `order_by` option from query when using `count()` (#452)
feat: add json_fields extras argument for adding to jsonPayload (#447)
ci: reduce number of workers for presubmit check (#447)
chore(deps): update dependency platformdirs to v2.6.2 (#447)
feat: media operation retries can be configured using the same interf…