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
feat: Add support for multiplexed sessions (#1383)
* Update `SessionOptions` to support `GOOGLE_CLOUD_SPANNER_FORCE_DISABLE_MULTIPLEXED_SESSIONS` and add unit tests.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Remove handling of `MethodNotImplemented` exception from `DatabaseSessionManager` and add unit tests.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Update `Connection` to use multiplexed sessions, add unit tests.
Signed-off-by: Taylor Curran <[email protected]>
* cleanup: Rename `beforeNextRetry` to `before_next_retry`.
Signed-off-by: Taylor Curran <[email protected]>
* cleanup: Fix a few unrelated typos.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add ingest of precommit tokens to `_SnapshotBase` and update attributes and tests.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Deprecate `StreamedResultSet._source` (redundant as transaction ID is set via `_restart_on_unavailable`)
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Move `_session_options` from `Database` to `Client` so that multiplexed are disabled for _all_ databases.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Deprecate `SessionCheckout` and update `Database.run_in_transaction` to not use it.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Deprecate `Database.session()` and minor cleanup.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Update `BatchSnapshot` to use database session manager.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Move `Batch` and `Transaction` attributes from class attributes to instance attributes.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Update pools so they don't use deprecated `database.session()`
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Update session to remove class attributes, add TODOs, and make `Session._transaction` default to None. Plus add some `Optional` typing hints.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Move begin transaction logic from `Snapshot` to `_SnapshotBase` and update unit tests.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Remove begin transaction logic from `Transaction`, move to base class, update tests.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add logic for beginning mutations-only transactions.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Cleanup and improve consistency of state checks, add `raises` documentation.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Cleanup documentation for `Batch.commit`, some minor cleanup.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add logic for retrying commits if precommit token returned.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Remove `GOOGLE_CLOUD_SPANNER_FORCE_DISABLE_MULTIPLEXED_SESSIONS` and update tests.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Cleanup `TestDatabaseSessionManager` so that it doesn't depend on environment variable values.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add type hints for `SessionOptions` and `DatabaseSessionManager`.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Fix `test_observability_options`
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Update `_builders` to use mock scoped credentials.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add helpers for mock scoped credentials for testing.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Fix failing `test_batch_insert_then_read`.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Fix failing `test_transaction_read_and_insert_then_rollback`.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add test helper for multiplexed env vars.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add unit tests for begin transaction base class, simplify `_SnapshotBase` tests, remove redundant tests.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Attempt to fix `test_transaction_read_and_insert_then_rollback` and add `build_request_id` helper method, fix `test_snapshot` and `test_transaction` failures.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add test for log when new session created by maintenance thread.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add additional multiplexed unit tests for `_SnapshotBase`.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Cleanup `Transaction` by extracting some constants for next step.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add additional `Transaction` tests for new multiplexed behaviour.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Fix linter
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Remove unnecessary TODO
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Remove unnecessary constants.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Remove support for disabling the use of multiplexed sessions due to runtime failures.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Make deprecation comments a bit more clear.
Signed-off-by: Taylor Curran <[email protected]>
* feat: Multiplexed sessions - Add some more type hints.
Signed-off-by: Taylor Curran <[email protected]>
---------
Signed-off-by: Taylor Curran <[email protected]>
0 commit comments