1.61.0 (2024-04-30)
- spanner/admin/instance: Adding
EXPECTED_FULFILLMENT_PERIOD
to the indicate instance creation times (withFULFILLMENT_PERIOD_NORMAL
orFULFILLMENT_PERIOD_EXTENDED
ENUM) with the extended instance creation time triggered by On-Demand Capacity... (#9693) (aa93790) - spanner/executor: Add SessionPoolOptions, SpannerOptions protos in executor protos (2cdc40a)
- spanner: Add support for change streams transaction exclusion option (#9779) (979ce94)
- spanner: Support MultiEndpoint (#9565) (0ac0d26)
- spanner/test/opentelemetry/test: Bump x/net to v0.24.0 (ba31ed5)
- spanner: Bump x/net to v0.24.0 (ba31ed5)
- spanner: Fix uint8 conversion (9221c7f)
1.60.0 (2024-03-19)
- spanner: Allow attempt direct path xds via env var (e4b663c)
1.59.0 (2024-03-13)
- spanner/spansql: Support Table rename & Table synonym (#9275) (9b97ce7)
- spanner: Add support of float32 type (#9525) (87d7ea9)
1.58.0 (2024-03-06)
- spanner/admin/instance: Add instance partition support to spanner instance proto (ae1f547)
- spanner: Add field for multiplexed session in spanner.proto (a86aa8e)
- spanner: SelectAll struct spanner tag annotation match should be case-insensitive (#9460) (6cd6a73)
- spanner: Update TransactionOptions to include new option exclude_txn_from_change_streams (0195fe9)
1.57.0 (2024-02-13)
- spanner: Add OpenTelemetry implementation (#9254) (fc51cc2)
- spanner: Support max_commit_delay in Spanner transactions (#9299) (a8078f0)
- spanner: Enable universe domain resolution options (fd1d569)
- spanner: Internal test package should import local version (#9416) (f377281)
- spanner: SelectAll struct fields match should be case-insensitive (#9417) (7ff5356)
- spanner: Support time.Time and other custom types using SelectAll (#9382) (dc21234)
- spanner: Update the comment regarding eligible SQL shapes for PartitionQuery (e60a6ba)
1.56.0 (2024-01-30)
- spanner/admin/database: Add proto descriptors for proto and enum types in create/update/get database ddl requests (97d62c7)
- spanner/spansql: Add support for CREATE VIEW with SQL SECURITY DEFINER (#8754) (5f156e8)
- spanner: Add FLOAT32 enum to TypeCode (97d62c7)
- spanner: Add max_commit_delay API (af2f8b4)
- spanner: Add proto and enum types (00b9900)
- spanner: Add SelectAll method to decode from Spanner iterator.Rows to golang struct (#9206) (802088f)
1.55.0 (2024-01-08)
1.54.0 (2023-12-14)
- spanner/executor: Add autoscaling config in the instance to support autoscaling in systests (29effe6)
- spanner: New clients (#9127) (2c97389)
1.53.1 (2023-12-01)
- spanner: Handle nil error when cleaning up long running session (#9052) (a93bc26)
- spanner: MarshalJSON function caused errors for certain values (#9063) (afe7c98)
1.53.0 (2023-11-15)
1.52.0 (2023-11-14)
- spanner: Add directed_read_option in spanner.proto (#8950) (24e410e)
- spanner: Add DML, DQL, Mutation, Txn Actions and Utility methods for executor framework (#8976) (ca76671)
- spanner: Add lastUseTime property to session (#8942) (b560cfc)
- spanner: Add method (#8945) (411a51e)
- spanner: Add methods to return Row fields (#8953) (e22e70f)
- spanner: Add PG.OID type cod annotation (#8749) (ffb0dda)
- spanner: Admin, Batch, Partition actions for executor framework (#8932) (b2db89e)
- spanner: Auto-generated executor framework proto changes (#8713) (2ca939c)
- spanner: BatchWrite (#8652) (507d232)
- spanner: Executor framework server and worker proxy (#8714) (6b931ee)
- spanner: Fix falkiness (#8977) (ca8d3cb)
- spanner: Long running transaction clean up - disabled (#8177) (461d11e)
- spanner: Update code for session leaks cleanup (#8978) (cc83515)
- spanner: Bump google.golang.org/api to v0.149.0 (8d2ab9f)
- spanner: Expose Mutations field in MutationGroup (#8923) (42180cf)
- spanner: Update grpc-go to v1.56.3 (343cea8)
- spanner: Update grpc-go to v1.59.0 (81a97b0)
- spanner: Updated comment formatting (24e410e)
1.51.0 (2023-10-17)
- spanner: Update golang.org/x/net to v0.17.0 (174da47)
1.50.0 (2023-10-03)
- spanner/spansql: Add support for aggregate functions (#8498) (d440d75)
- spanner/spansql: Add support for bit functions, sequence functions and GENERATE_UUID (#8482) (3789882)
- spanner/spansql: Add support for SEQUENCE statements (#8481) (ccd0205)
- spanner: Add BatchWrite API (02a899c)
- spanner: Allow non-default service accounts (#8488) (c90dd00)
1.49.0 (2023-08-24)
1.48.0 (2023-08-18)
- spanner/spansql: Add complete set of math functions (#8246) (d7a238e)
- spanner/spansql: Add support for foreign key actions (#8296) (d78b851)
- spanner/spansql: Add support for IF NOT EXISTS and IF EXISTS clause (#8245) (96840ab)
- spanner: Add integration tests for Bit Reversed Sequences (#7924) (9b6e7c6)
- spanner: Reset buffer after abort on first SQL statement (#8440) (d980b42)
- spanner: REST query UpdateMask bug (df52820)
1.47.0 (2023-06-20)
- spanner/admin/database: Add DdlStatementActionInfo and add actions to UpdateDatabaseDdlMetadata (01eff11)
- spanner: Add databoost property for batch transactions (#8152) (fc49c78)
- spanner: Add tests for database roles in PG dialect (#7898) (dc84649)
- spanner: Enable client to server compression (#7899) (3a047d2)
- spanner: Update all direct dependencies (b340d03)
1.46.0 (2023-05-12)
- spanner/admin/database: Add support for UpdateDatabase in Cloud Spanner (#7917) (83870f5)
- spanner: Make leader aware routing default enabled for supported RPC requests. (#7912) (d0d3755)
- spanner: Update grpc to v1.55.0 (1147ce0)
1.45.1 (2023-04-21)
- spanner/spannertest: Send transaction id in result metadata (#7809) (e3bbd5f)
- spanner: Context timeout should be wrapped correctly (#7744) (f8e22f6)
1.45.0 (2023-04-10)
- spanner/spansql: Add support for missing DDL syntax for ALTER CHANGE STREAM (#7429) (d34fe02)
- spanner/spansql: Support fine-grained access control DDL syntax (#6691) (a7edf6b)
- spanner/spansql: Support grant/revoke view, change stream, table function (#7533) (9c61215)
- spanner: Add x-goog-spanner-route-to-leader header to Spanner RPC contexts for RW/PDML transactions. (#7500) (fcab05f)
- spanner: Adding new fields for Serverless analytics (69067f8)
- spanner: Enable custom decoding for list value (#7463) (3aeadcd)
- spanner: Update iam and longrunning deps (91a1f78)
- spanner/spansql: Fix SQL for CREATE CHANGE STREAM TableName; case (#7514) (fc5fd86)
- spanner: Correcting the proto field Id for field data_boost_enabled (00fff3a)
1.44.0 (2023-02-01)
- spanner/spansql: Add support for ALTER INDEX statement (#7287) (fbe1bd4)
- spanner/spansql: Add support for managing the optimizer statistics package (#7283) (e528221)
- spanner: Add support for Optimistic Concurrency Control (#7332) (48ba16f)
1.43.0 (2023-01-19)
- spanner/spansql: Add support for change stream value_capture_type option (#7201) (27b3398)
- spanner/spansql: Support
default_leader
database option (#7187) (88adaa2) - spanner: Add REST client (06a54a1)
- spanner: Inline begin transaction for ReadWriteTransactions (#7149) (2ce3606)
1.42.0 (2022-12-14)
- spanner: Add database roles (#5701) (6bb95ef)
- spanner: Rewrite signatures and type in terms of new location (620e6d8)
- spanner: Fallback to check grpc error message if ResourceType is nil for checking sessionNotFound errors (#7163) (2552e09)
1.41.0 (2022-12-01)
1.40.0 (2022-11-03)
- spanner/spansql: Add support for interval arg of some date/timestamp functions (#6950) (1ce0f7d)
- spanner: Configurable logger (#6958) (bd85442), refs #6957
- spanner: PG JSONB support (#6874) (5b14658)
- spanner: Update result_set.proto to return undeclared parameters in ExecuteSql API (de4e16a)
- spanner: Update transaction.proto to include different lock modes (caf4afa)
1.39.0 (2022-09-21)
- spanner/admin/database: Add custom instance config operations (ec1a190)
- spanner/admin/instance: Add custom instance config operations (ef2b0b1)
- spanner/spannersql: Add backticks when name contains a hypen (#6621) (e88ca66)
- spanner/spansql: Add support for create, alter and drop change … (#6669) (cc4620a)
- spanner: Retry spanner transactions and mutations when RST_STREAM error (#6699) (1b56cd0)
- spanner/admin/database: Revert add custom instance config operations (change broke client libraries; reverting before any are released) (ec1a190)
- spanner: Destroy session when client is closing (#6700) (a1ce541)
- spanner: Spanner sessions will be cleaned up from the backend (#6679) (c27097e)
1.38.0 (2022-09-03)
- spanner/spannertest: add support for adding and dropping Foreign Keys (#6608) (ccd3614)
- spanner/spansql: add support for coalesce expressions (#6461) (bff16a7)
- spanner: Adds auto-generated CL for googleapis for jsonb (3bc37e2)
1.37.0 (2022-08-28)
- spanner/admin/database: Add ListDatabaseRoles API to support role based access control (1ffeb95)
- spanner/spansql: add support for nullif expressions (#6423) (5b7bfeb)
- spanner: install grpc rls and xds by default (#6007) (70d562f)
- spanner: set client wide ReadOptions, ApplyOptions, and TransactionOptions (#6486) (757f1ca)
- spanner/admin/database: target new spanner db admin service config (1d6fbcc)
1.36.0 (2022-07-23)
- spanner/spansql: add support for IFNULL expressions (#6389) (09e96ce)
- spanner/spansql: support for parsing a DML file (#6349) (267a9bb)
1.35.0 (2022-07-19)
- spanner/admin/instance: Adding two new fields for Instance create_time and update_time (8a1ad06)
- spanner/spansql: add support for if expressions (#6341) (56c858c)
1.34.1 (2022-07-06)
1.34.0 (2022-06-17)
- spanner/spansql: add a support for parsing INSERT statement (#6148) (c6185cf)
- spanner: add Session creator role docs: clarify transaction semantics (4134941)
1.33.0 (2022-05-28)
1.32.0 (2022-05-09)
- spanner/spansql: support DEFAULT keyword (#5932) (49c19a9)
- spanner/spansql: support JSON literals (#5968) (b500120)
- spanner: enable row.ToStructLenient to work with STRUCT data type (#5944) (bca8d50)
1.31.0 (2022-04-08)
1.30.1 (2022-03-28)
- spanner: early unlock of session pool lock during dumping the tracked session handles to avoid deadlock (#5777) (b007836)
1.30.0 (2022-03-04)
- spanner: add better version metadata to calls (#5515) (dcab7c4), refs #2749
- spanner: add file for tracking version (17b36ea)
- spanner: add support of PGNumeric with integration tests for PG dialect (#5700) (f7e02e1)
- spanner: set versionClient to module version (55f0d92)
1.29.0 (2022-01-06)
- spanner: fix data race in spanner integration tests (#5276)
- spanner/spansql: support EXTRACT (#5218) (81b7c85)
- spanner/spansql: support MOD function (#5231) (0a81fbc)
- spanner: add google-c2p dependence (5343756)
- spanner: Add ReadRowWithOptions method (#5240) (c276428)
- spanner: Adding GFE Latency and Header Missing Count Metrics (#5199) (3d8a9ea)
- spanner: result from unmarshal of string and spanner.NullString type from json should be consistent. (#5263) (7eaaa47)
1.28.0 (2021-12-03)
- spanner/spannertest: support JSON_VALUE function (#5173) (ac98735)
- spanner/spansql: support CAST and SAFE_CAST (#5057) (54cbf4c)
- spanner: add ToStructLenient method to decode to struct fields with no error return with un-matched row's column with struct's exported fields. (#5153) (899ffbf)
1.27.0 (2021-10-19)
1.26.0 (2021-10-11)
- spanner/spannertest: implement RowDeletionPolicy in spannertest (#4961) (7800a33), refs #4782
- spanner/spannertest: Support generated columns (#4742) (324d11d)
- spanner/spansql: fill in missing hash functions (#4808) (37ee2d9)
- spanner/spansql: support JSON data type (#4959) (e84e408)
- spanner/spansql: Support multiple joins in query (#4743) (81a308e)
1.25.0 (2021-08-25)
- spanner/spansql: add support for STARTS_WITH function (#4670) (7a56af0), refs #4661
- spanner: add support for JSON data type (#4104) (ade8ab1)
- spanner/spannertest: Fix the "LIKE" clause handling for prefix and suffix matches (#4655) (a2118f0)
- spanner: invalid numeric should throw an error (#3926) (cde8697)
1.24.1 (2021-08-11)
- spanner/spansql: only add comma after other option (#4551) (3ac1e00)
- spanner: allow decoding null values to spanner.Decoder (#4558) (45ddaca), refs #4552
1.24.0 (2021-07-29)
- spanner/spansql: add ROW DELETION POLICY parsing (#4496) (3d6c6c7)
- spanner/spansql: fix unstable SelectFromTable SQL (#4473) (39bc4ec)
- spanner/spansql: support ALTER DATABASE (#4403) (1458dc9)
- spanner/spansql: support table_hint_expr at from_clause on query_statement (#4457) (7047808)
- spanner: add row.String() and refine error message for decoding a struct array (#4431) (f6258a4)
- spanner: allow untyped nil values in parameterized queries (#4482) (c1ba18b)
1.23.0 (2021-07-08)
- spanner/admin/database: add leader_options to InstanceConfig and default_leader to Database (7aa0e19)
1.22.0 (2021-06-30)
- spanner: support request and transaction tags (#4336) (f08c73a)
- spanner: enable request options for batch read (#4337) (b9081c3)
1.21.0 (2021-06-23)
1.20.0 (2021-06-08)
1.19.0 (2021-06-03)
- spanner/spannertest: support multiple aggregations (#3965) (1265dc3)
- spanner/spansql: case insensitive parsing of keywords and functions (#4034) (ddb09d2)
- spanner: add a database name getter to client (#4190) (7fce29a)
- spanner: add custom instance config to tests (#4194) (e935345)
- spanner: add missing NUMERIC type to the doc for Row (#4116) (9a3b416)
- spanner: indent code example for Encoder and Decoder (#4128) (7c1f48f)
- spanner: mark SessionPoolConfig.MaxBurst deprecated (#4115) (d60a686)
1.18.0 (2021-04-29)
- spanner/admin/database: add
progress
field toUpdateDatabaseDdlMetadata
(9029071)
1.17.0 (2021-03-31)
- spanner/admin/database: add tagging request options (2b02a03)
- spanner: add RPC Priority request options (b5b4da6)
- spanner: Add support for RPC priority (#3341) (88cf097)
1.16.0 (2021-03-17)
- spanner: add
optimizer_statistics_package
field inQueryOptions
(18c88c4) - spanner/admin/database: add CMEK fields to backup and database (16597fa)
1.15.0 (2021-02-24)
- spanner/admin/database: add CMEK fields to backup and database (47037ed)
- spanner/admin/database: add CMEK fields to backup and database (16597fa)
1.14.1 (2021-02-09)
1.14.0 (2021-02-09)
- spanner/admin/database: adds PITR fields to backup and database (0959f27)
- spanner/spannertest: restructure column alteration implementation (#3616) (176400b)
- spanner/spansql: add complete set of array functions (#3633) (13d50b9)
- spanner/spansql: add complete set of string functions (#3625) (34027ad)
- spanner: add option for returning Spanner commit stats (c7ecf0f)
- spanner: add option for returning Spanner commit stats (7bdebad)
- spanner: support CommitStats (#3444) (b7c3ca6)
- spanner/spannertest: support queries in ExecuteSql (#3640) (8eede84), refs #3639
- spanner/spansql: fix SelectFromJoin behavior (#3571) (e0887c7)
1.13.0 (2021-01-15)
- spanner/spannertest: implement ANY_VALUE aggregation function (#3428) (e16c3e9)
- spanner/spannertest: implement FULL JOIN (#3218) (99f7212)
- spanner/spannertest: implement SELECT ... FROM UNNEST(...) (#3431) (deb466f)
- spanner/spannertest: support array literals (#3438) (69e0110)
- spanner/spannertest: support AVG aggregation function (#3286) (4788415)
- spanner/spannertest: support Not Null constraint (#3491) (c36aa07)
- spanner/spannertest: support UPDATE DML (#3201) (1dec6f6)
- spanner/spansql: define structures and parse UPDATE DML statements (#3192) (23b6904)
- spanner/spansql: support DATE and TIMESTAMP literals (#3557) (1961930)
- spanner/spansql: support for parsing generated columns (#3373) (9b1d06f)
- spanner/spansql: support NUMERIC data type (#3411) (1bc65d9)
- spanner: Add a DirectPath fallback integration test (#3487) (de821c5)
- spanner: attempt DirectPath by default (#3516) (bbc61ed)
- spanner: include User agent (#3465) (4e1ef1b)
- spanner: run E2E test over DirectPath (#3466) (18e3a4f)
- spanner: support NUMERIC in mutations (#3328) (fa90737)
1.12.0 (2020-11-10)
- spanner: add metadata to RowIterator (#3050) (9a2289c), closes #1805
- spanner: export ToSpannerError (#3133) (b951d8b), closes #3122
- spanner: support rw-transaction with options (#3058) (5130694)
- spanner/spannertest: make SELECT list aliases visible to ORDER BY (#3054) (7d2d83e), closes #3043
- Features:
- feat(spanner): add KeySetFromKeys function (#2837)
- Misc:
- test(spanner): check for Aborted error (#3039)
- test(spanner): fix potential race condition in TestRsdBlockingStates (#3017)
- test(spanner): compare data instead of struct (#3013)
- test(spanner): fix flaky oc_test.go (#2838)
- docs(spanner): document NULL value (#2885)
- spansql/spannertest:
- Support JOINs (all but FULL JOIN) (#2936, #2924, #2896, #3042, #3037, #2995, #2945, #2931)
- feat(spanner/spansql): parse CHECK constraints (#3046)
- fix(spanner/spansql): fix parsing of unary minus and plus (#2997)
- fix(spanner/spansql): fix parsing of adjacent inline and leading comments (#2851)
- fix(spanner/spannertest): fix ORDER BY combined with SELECT aliases (#3043)
- fix(spanner/spannertest): generate query output columns in construction order (#2990)
- fix(spanner/spannertest): correct handling of NULL AND FALSE (#2991)
- fix(spanner/spannertest): correct handling of tri-state boolean expression evaluation (#2983)
- fix(spanner/spannertest): fix handling of NULL with LIKE operator (#2982)
- test(spanner/spannertest): migrate most test code to integration_test.go (#2977)
- test(spanner/spansql): add fuzz target for ParseQuery (#2909)
- doc(spanner/spannertest): document the implementation (#2996)
- perf(spanner/spannertest): speed up no-wait DDL changes (#2994)
- perf(spanner/spansql): make fewer allocations during SQL (#2969)
- Backward Incompatible Changes
- chore(spanner/spansql): use ID type for identifiers throughout (#2889)
- chore(spanner/spansql): restructure FROM, TABLESAMPLE (#2888)
- feat(spanner): add support for NUMERIC data type (#2415)
- feat(spanner): add custom type support to spanner.Key (#2748)
- feat(spanner/spannertest): add support for bool parameter types (#2674)
- fix(spanner): update PDML to take sessions from pool (#2736)
- spanner/spansql: update docs on TableAlteration, ColumnAlteration (#2825)
- spanner/spannertest: support dropping columns (#2823)
- spanner/spannertest: implement GetDatabase (#2802)
- spanner/spannertest: fix aggregation in query evaluation for empty inputs (#2803)
- Features:
- feat(spanner): support custom field type (#2614)
- Bugfixes:
- fix(spanner): call ctx.cancel after stats have been recorded (#2728)
- fix(spanner): retry session not found for read (#2724)
- fix(spanner): specify credentials with SPANNER_EMULATOR_HOST (#2701)
- fix(spanner): update pdml to retry EOS internal error (#2678)
- Misc:
- test(spanner): unskip tests for emulator (#2675)
- spansql/spannertest:
- spanner/spansql: restructure types and parsing for column options (#2656)
- spanner/spannertest: return error for Read with no keys (#2655)
- Features:
- feat(spanner): support of client-level custom retry settings (#2599)
- feat(spanner): add a statement-based way to run read-write transaction. (#2545)
- Bugfixes:
- fix(spanner): set 'gccl' to the request header. (#2609)
- fix(spanner): add the missing resource prefix (#2605)
- fix(spanner): fix the upgrade of protobuf. (#2583)
- fix(spanner): do not copy protobuf messages by value. (#2581)
- fix(spanner): fix the required resource prefix. (#2580)
- fix(spanner): add extra field to ignore with cmp (#2577)
- fix(spanner): remove appengine-specific numChannels. (#2513)
- Misc:
- test(spanner): log warning instead of fail for stress test (#2559)
- test(spanner): fix failed TestRsdBlockingStates test (#2597)
- chore(spanner): cleanup mockserver and mockclient (#2414)
- Retry:
- Only retry certain types of internal errors. (#2460)
- Tracing/metrics:
- Never sample
ping()
trace spans (#2520) - Add oc tests for session pool metrics. (#2416)
- Never sample
- Encoding:
- Allow encoding struct with custom types to mutation (#2529)
- spannertest:
- Fix evaluation on IN (#2479)
- Support MIN/MAX aggregation functions (#2411)
- Misc:
- Fix TestClient_WithGRPCConnectionPoolAndNumChannels_Misconfigured test (#2539)
- Cleanup backoff files and rename a variable (#2526)
- Fix TestIntegration_DML test to return err from tx (#2509)
- Unskip tests for emulator 0.8.0. (#2494)
- Fix TestIntegration_StartBackupOperation test. (#2418)
- Fix flakiness in TestIntegration_BatchDML_Error
- Unskip TestIntegration_BatchDML and TestIntegration_BatchDML_TwoStatements for emulator by checking the existence of status.
- Fix TestStressSessionPool test by taking lock while getting sessions from hc.
- Sessions:
- Increase the number of sessions in batches instead of one by one when additional sessions are needed. The step size is set to 25, which means that whenever the session pool needs at least one more session, it will create a batch of 25 sessions.
- Emulator:
- Run integration tests against the emulator in Kokoro Presubmit.
- RPC retrying:
- Retry CreateDatabase on retryable codes.
- spannertest:
- Change internal representation of DATE/TIMESTAMP values.
- spansql:
- Cleanly parse adjacent comment marker/terminator.
- Support FROM aliases in SELECT statements.
- Misc:
- Fix comparing errors in tests.
- Fix flaky session pool test.
- Increase timeout in TestIntegration_ReadOnlyTransaction.
- Fix incorrect instance IDs when deleting instances in tests.
- Clean up test instances.
- Clearify docs on Aborted transaction.
- Fix timeout+staleness bound for test
- Remove the support for resource-based routing.
- Fix TestTransaction_SessionNotFound test.
- Fix incorrect decreasing metrics, numReads and numWrites.
- Fix an issue that XXX fields/methods are internal to proto and may change at any time. XXX_Merge panics in proto v1.4.0. Use proto.Merge instead of XXX_Merge.
- spannertest: handle list parameters in RPC interfacea.
- Metrics
- Instrument client library with adding OpenCensus metrics. This allows for better monitoring of the session pool.
- Session management
- Switch the session keepalive method from GetSession to SELECT 1.
- Emulator
- Use client hooks for admin clients running against an emulator. With this change, users can use SPANNER_EMULATOR_HOST for initializing admin clients when running against an emulator.
- spansql
- Add space between constraint name and foreign key def.
- Misc
- Fix segfault when a non-existent credentials file had been specified.
- Fix cleaning up instances in integration tests.
- Fix race condition in batch read-only transaction.
- Fix the flaky TestLIFOTakeWriteSessionOrder test.
- Fix ITs to order results in SELECT queries.
- Fix the documentation of timestamp bounds.
- Fix the regex issue in managing backups.
- Support managed backups. This includes the API methods for CreateBackup, GetBackup, UpdateBackup, DeleteBackup and others. Also includes a simple wrapper in DatabaseAdminClient to create a backup.
- Update the healthcheck interval. The default interval is updated to 50 mins. By default, the first healthcheck is scheduled between 10 and 55 mins and the subsequent healthchecks are between 45 and 55 mins. This update avoids overloading the backend service with frequent healthchecking.
- Query options:
- Adds the support of providing query options (optimizer version) via
three ways (precedence follows the order):
client-level < environment variables < query-level
. The environment variable is set by "SPANNER_OPTIMIZER_VERSION".
- Adds the support of providing query options (optimizer version) via
three ways (precedence follows the order):
- Connection pooling:
- Use the new connection pooling in gRPC. This change deprecates
ClientConfig.numChannels
and users should move toWithGRPCConnectionPool(numChannels)
at their earliest convenience. Example:// numChannels (deprecated): err, client := NewClientWithConfig(ctx, database, ClientConfig{NumChannels: 8}) // gRPC connection pool: err, client := NewClientWithConfig(ctx, database, ClientConfig{}, option.WithGRPCConnectionPool(8))
- Use the new connection pooling in gRPC. This change deprecates
- Error handling:
- Do not rollback after failed commit.
- Return TransactionOutcomeUnknownError if a DEADLINE_EXCEEDED or CANCELED error occurs while a COMMIT request is in flight.
- spansql:
- Added support for IN expressions and OFFSET clauses.
- Fixed parsing of table constraints.
- Added support for foreign key constraints in ALTER TABLE and CREATE TABLE.
- Added support for GROUP BY clauses.
- spannertest:
- Added support for IN expressions and OFFSET clauses.
- Added support for GROUP BY clauses.
- Fixed data race in query execution.
- No longer rejects reads specifying an index to use.
- Return last commit timestamp as read timestamp when requested.
- Evaluate add, subtract, multiply, divide, unary negation, unary not, bitwise and/xor/or operations, as well as reporting column types for expressions involving any possible arithmetic operator.arithmetic expressions.
- Fixed handling of descending primary keys.
- Misc:
- Change default healthcheck interval to 30 mins to reduce the GetSession calls made to the backend.
- Add marshal/unmarshal json for nullable types to support NullString, NullInt64, NullFloat64, NullBool, NullTime, NullDate.
- Use ResourceInfo to extract error.
- Extract retry info from status.
- Fix session leakage for ApplyAtLeastOnce. Previously session handles where leaked whenever Commit() returned a non-abort, non-session-not-found error, due to a missing recycle() call.
- Fix error for WriteStruct with pointers. This fixes a specific check for encoding and decoding to pointer types.
- Fix a GRPCStatus issue that returns a Status that has Unknown code if the base error is nil. Now, it always returns a Status based on Code field of current error.
- Support tracking stacktrace of sessionPool.take() that allows the user
to instruct the session pool to keep track of the stacktrace of each
goroutine that checks out a session from the pool. This is disabled by
default, but it can be enabled by setting
SessionPoolConfig.TrackSessionHandles: true
. - Add resource-based routing that includes a step to retrieve the
instance-specific endpoint before creating the session client when
creating a new spanner client. This is disabled by default, but it can
be enabled by setting
GOOGLE_CLOUD_SPANNER_ENABLE_RESOURCE_BASED_ROUTING
. - Make logger configurable so that the Spanner client can now be configured to use a specific logger instead of the standard logger.
- Support encoding custom types that point back to supported basic types.
- Allow decoding Spanner values to custom types that point back to supported types.
- The String() method of NullString, NullTime and NullDate will now return an unquoted string instead of a quoted string. This is a BREAKING CHANGE. If you relied on the old behavior, please use fmt.Sprintf("%q", T).
- The Spanner client will now use the new BatchCreateSessions RPC to initialize the session pool. This will improve the startup time of clients that are initialized with a minimum number of sessions greater than zero (i.e. SessionPoolConfig.MinOpened>0).
- Spanner clients that are created with the NewClient method will now default to a minimum of 100 opened sessions in the pool (i.e. SessionPoolConfig.MinOpened=100). This will improve the performance of the first transaction/query that is executed by an application, as a session will normally not have to be created as part of the transaction. Spanner clients that are created with the NewClientWithConfig method are not affected by this change.
- Spanner clients that are created with the NewClient method will now default to a write sessions fraction of 0.2 in the pool (i.e. SessionPoolConfig.WriteSessions=0.2). Spanner clients that are created with the NewClientWithConfig method are not affected by this change.
- The session pool maintenance worker has been improved so it keeps better track of the actual number of sessions needed. It will now less often delete and re-create sessions. This can improve the overall performance of applications with a low transaction rate.
This is the first tag to carve out spanner as its own module. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.