Skip to content

Add a 'Batch': collects non-transactional saves / deletes. - #509

Merged
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:421-dataset_batch_put_delete
Jan 8, 2015
Merged

Add a 'Batch': collects non-transactional saves / deletes.#509
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:421-dataset_batch_put_delete

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

Closes#421.

@coveralls

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 90a20d1 on tseaver:421-dataset_batch_put_delete into * on GoogleCloudPlatform:master*.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Batch largely patterend after Transaction: we could maybe even derive Transation from batch.

Note that I dropped the "update auto_id keys" bits on the floor: we can add them if they are important for the usecase.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 65621f3 on tseaver:421-dataset_batch_put_delete into f577b30 on GoogleCloudPlatform:master.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes

Copy link
Copy Markdown
Contributor

It's pleasantly surprising how simple the tweaks to Connection were!

I have some other ideas floating around that relate to this (including #495). Could we jump on a video chat tomorrow (January 8) AM to discuss?


I was initially thrown off by the Batch concept since I am used to a strict distinction of ndb.put_multi and ndb.delete_multi. However, Mutation is happy to accommodate all.

Comment threadgcloud/datastore/batch.py Outdated

This comment was marked as spam.

This comment was marked as spam.

@dhermes

Copy link
Copy Markdown
Contributor

LGTM save for removing self._id (a remnant of Transaction).

I'll write up a bug outlining a "migration" path based off #495

@tseaver

Copy link
Copy Markdown
ContributorAuthor

I have changes stashed which add the "insert_auto_id*" fixups to Batch. Should I push them, or defer to another PR?

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling cf6873b on tseaver:421-dataset_batch_put_delete into f577b30 on GoogleCloudPlatform:master.

@dhermesdhermes mentioned this pull request Jan 8, 2015
8 tasks
@dhermes

Copy link
Copy Markdown
Contributor

Let's defer to another PR so we can ask Patrick about it without lots of distracting other code.

tseaver added a commit that referenced this pull request Jan 8, 2015
Add a 'Batch': collects non-transactional saves / deletes.
@tseaver
tseaver merged commit 3a448f3 into googleapis:masterJan 8, 2015
@tseaver
tseaver deleted the 421-dataset_batch_put_delete branch January 8, 2015 18:17
@dhermesdhermes added the api: datastore Issues related to the Datastore API. label Dec 31, 2015
atulep pushed a commit that referenced this pull request Apr 3, 2023
…est (#509)
* feat: Add support for BatchRecognize
Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.
PiperOrigin-RevId: 517976288
Source-Link: googleapis/googleapis@7ee7867
Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs: fix the resource name format in comment for CreatePhraseSetRequest
PiperOrigin-RevId: 518025142
Source-Link: googleapis/googleapis@e354eef
Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
…est (#509)
* feat: Add support for BatchRecognize
Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.
PiperOrigin-RevId: 517976288
Source-Link: googleapis/googleapis@7ee7867
Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs: fix the resource name format in comment for CreatePhraseSetRequest
PiperOrigin-RevId: 518025142
Source-Link: googleapis/googleapis@e354eef
Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 6, 2023
…est (#509)
* feat: Add support for BatchRecognize
Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.
PiperOrigin-RevId: 517976288
Source-Link: googleapis/googleapis@7ee7867
Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs: fix the resource name format in comment for CreatePhraseSetRequest
PiperOrigin-RevId: 518025142
Source-Link: googleapis/googleapis@e354eef
Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this pull request Apr 18, 2023
…est (#509)
* feat: Add support for BatchRecognize
Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.
PiperOrigin-RevId: 517976288
Source-Link: googleapis/googleapis@7ee7867
Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs: fix the resource name format in comment for CreatePhraseSetRequest
PiperOrigin-RevId: 518025142
Source-Link: googleapis/googleapis@e354eef
Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
vchudnov-g pushed a commit that referenced this pull request Sep 20, 2023
* fix!: correct broken ConversationModelEvaluation resource pattern
PiperOrigin-RevId: 442646533
Source-Link: googleapis/googleapis@b62c562
Source-Link: googleapis/googleapis-gen@f5c157c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjVjMTU3YzY4MTE1ODQ3ZDc4ZWI4NDEyNzM0Y2I4MmU3ZDU1MTViNCJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
* chore: Update gapic-generator-python to v1.11.4
PiperOrigin-RevId: 547897126
Source-Link: googleapis/googleapis@c09c75e
Source-Link: googleapis/googleapis-gen@45e0ec4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDVlMGVjNDM0MzUxN2NkMGFhNjZiNWNhNjQyMzJhMTgwMmMyZjk0NSJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
add code line to set metric label in addition to resource label.
make the code sample align with similar samples in other languages.
parthea pushed a commit that referenced this pull request Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@dede53f
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:fac304457974bb530cc5396abd4ab25d26a469cd3bc97cbfb18c8d4324c584eb
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 22, 2023
…est (#509)
* feat: Add support for BatchRecognize
Deprecate the `update_config_request` field in the `OperationMetadata` message, which was never used and is output only.
PiperOrigin-RevId: 517976288
Source-Link: googleapis/googleapis@7ee7867
Source-Link: googleapis/googleapis-gen@04050e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDQwNTBlMTVlN2E0MDlmOWQ0MjFmNjNkYmZkZjM3ZWFjNzJhM2MxNCJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs: fix the resource name format in comment for CreatePhraseSetRequest
PiperOrigin-RevId: 518025142
Source-Link: googleapis/googleapis@e354eef
Source-Link: googleapis/googleapis-gen@f3e2685
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjNlMjY4NTBlYjU0NWYzN2U0MWEzZGE3MTQyNmQxMzIwMmVhZTAxMyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Aug 21, 2025
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 473833416
Source-Link: googleapis/googleapis@565a550
Source-Link: googleapis/googleapis-gen@1ee1a06
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9
feat: add proto annotation for non-ascii field mapping
PiperOrigin-RevId: 473815595
Source-Link: googleapis/googleapis@46cfc4c
Source-Link: googleapis/googleapis-gen@955ca31
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTU1Y2EzMWQ4MTEwMGQ4MWVkN2UwYWUwNTIyMzU4YWM0NWQ1M2NjOSJ9
parthea pushed a commit that referenced this pull request Sep 16, 2025
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 473833416
Source-Link: googleapis/googleapis@565a550
Source-Link: googleapis/googleapis-gen@1ee1a06
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9
feat: add proto annotation for non-ascii field mapping
PiperOrigin-RevId: 473815595
Source-Link: googleapis/googleapis@46cfc4c
Source-Link: googleapis/googleapis-gen@955ca31
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTU1Y2EzMWQ4MTEwMGQ4MWVkN2UwYWUwNTIyMzU4YWM0NWQ1M2NjOSJ9
parthea pushed a commit that referenced this pull request Sep 18, 2025
)
Source-Link: googleapis/synthtool@7804ade
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:eede5672562a32821444a8e803fb984a6f61f2237ea3de229d2de24453f4ae7d
parthea pushed a commit that referenced this pull request Nov 22, 2025
* feat: Add support for autoscaling
- Add the parameters min_serve_nodes, max_serve_nodes, and cpu_utilization_percent
- Create disable_autoscaling function
- Update documentation and tests
- Add validation when scaling config was not set correctly.
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea added a commit that referenced this pull request Nov 24, 2025
The old `intersphinx_mapping` format has been removed; it must now map
identifiers to (target, inventory) tuples.
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: Drew Brown <drewbr@google.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
…#511)
Since the result sets for multiqueries have to be merged, if a
projection is specified, make sure the projection used for the
underlying Datstore queries includes any properties we need for a sorted
merge.
Fixes#509.
parthea pushed a commit that referenced this pull request Nov 25, 2025
Co-authored-by: Drew Brown <drewbr@google.com>
parthea pushed a commit that referenced this pull request Nov 26, 2025
* updated CHANGELOG.md [ci skip]
* updated setup.cfg [ci skip]
* updated setup.py [ci skip]
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 2, 2026
Closes#500.
**PR checklist:**
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-pubsub/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
parthea pushed a commit that referenced this pull request Mar 2, 2026
🤖 I have created a release \*beep\* \*boop\*
---
## [2.9.0](https://www.github.com/googleapis/python-pubsub/compare/v2.8.0...v2.9.0) (2021-11-10)
### Features
* add context manager support in client ([#516](https://www.github.com/googleapis/python-pubsub/issues/516)) ([51eae67](https://www.github.com/googleapis/python-pubsub/commit/51eae67c47e2ce7d2f7620209e98df4a129801b5))
* add support for Python 3.10 ([#518](https://www.github.com/googleapis/python-pubsub/issues/518)) ([bb25d75](https://www.github.com/googleapis/python-pubsub/commit/bb25d755d70ba19e69d8a281be65f13eb994967d))
### Bug Fixes
* add 'dict' annotation type to 'request' ([b72522a](https://www.github.com/googleapis/python-pubsub/commit/b72522a4617c4b2773fb6a5a631038791aa08300))
* **deps:** drop packaging dependency ([290b9c5](https://www.github.com/googleapis/python-pubsub/commit/290b9c5615eaa03674b773a27b756483abd76195))
* **deps:** require google-api-core >= 1.28.0 ([290b9c5](https://www.github.com/googleapis/python-pubsub/commit/290b9c5615eaa03674b773a27b756483abd76195))
* improper types in pagers generation ([2ad639d](https://www.github.com/googleapis/python-pubsub/commit/2ad639d6370c7a085498595d7bd0d7eaadfff3c1))
### Documentation
* add type annotations to codebase ([#509](https://www.github.com/googleapis/python-pubsub/issues/509)) ([093cabf](https://www.github.com/googleapis/python-pubsub/commit/093cabff9f0464b1dfaa8f373b6fffbc439518de))
* list oneofs in docstring ([290b9c5](https://www.github.com/googleapis/python-pubsub/commit/290b9c5615eaa03674b773a27b756483abd76195))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
parthea pushed a commit that referenced this pull request Mar 6, 2026
parthea pushed a commit that referenced this pull request Mar 9, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastoreIssues related to the Datastore API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batch dataset.put and dataset.delete.

3 participants

@tseaver@coveralls@dhermes