1# Changes
2
3## v1.4.0
4
5- Support managed backups. This includes the API methods for CreateBackup,
6  GetBackup, UpdateBackup, DeleteBackup and others. Also includes a simple
7  wrapper in DatabaseAdminClient to create a backup.
8- Update the healthcheck interval. The default interval is updated to 50 mins.
9  By default, the first healthcheck is scheduled between 10 and 55 mins and
10  the subsequent healthchecks are between 45 and 55 mins. This update avoids
11  overloading the backend service with frequent healthchecking.
12
13## v1.3.0
14
15* Query options:
16  - Adds the support of providing query options (optimizer version) via
17    three ways (precedence follows the order):
18    `client-level < environment variables < query-level`. The environment
19    variable is set by "SPANNER_OPTIMIZER_VERSION".
20* Connection pooling:
21  - Use the new connection pooling in gRPC. This change deprecates
22    `ClientConfig.numChannels` and users should move to
23    `WithGRPCConnectionPool(numChannels)` at their earliest convenience.
24    Example:
25    ```go
26    // numChannels (deprecated):
27    err, client := NewClientWithConfig(ctx, database, ClientConfig{NumChannels: 8})
28
29    // gRPC connection pool:
30    err, client := NewClientWithConfig(ctx, database, ClientConfig{}, option.WithGRPCConnectionPool(8))
31    ```
32* Error handling:
33  - Do not rollback after failed commit.
34  - Return TransactionOutcomeUnknownError if a DEADLINE_EXCEEDED or CANCELED
35    error occurs while a COMMIT request is in flight.
36* spansql:
37  - Added support for IN expressions and OFFSET clauses.
38  - Fixed parsing of table constraints.
39  - Added support for foreign key constraints in ALTER TABLE and CREATE TABLE.
40  - Added support for GROUP BY clauses.
41* spannertest:
42  - Added support for IN expressions and OFFSET clauses.
43  - Added support for GROUP BY clauses.
44  - Fixed data race in query execution.
45  - No longer rejects reads specifying an index to use.
46  - Return last commit timestamp as read timestamp when requested.
47  - Evaluate add, subtract, multiply, divide, unary
48    negation, unary not, bitwise and/xor/or operations, as well as reporting
49    column types for expressions involving any possible arithmetic
50    operator.arithmetic expressions.
51  - Fixed handling of descending primary keys.
52* Misc:
53  - Change default healthcheck interval to 30 mins to reduce the GetSession
54    calls made to the backend.
55  - Add marshal/unmarshal json for nullable types to support NullString,
56    NullInt64, NullFloat64, NullBool, NullTime, NullDate.
57  - Use ResourceInfo to extract error.
58  - Extract retry info from status.
59
60## v1.2.1
61
62- Fix session leakage for ApplyAtLeastOnce. Previously session handles where
63  leaked whenever Commit() returned a non-abort, non-session-not-found error,
64  due to a missing recycle() call.
65- Fix error for WriteStruct with pointers. This fixes a specific check for
66  encoding and decoding to pointer types.
67- Fix a GRPCStatus issue that returns a Status that has Unknown code if the
68  base error is nil. Now, it always returns a Status based on Code field of
69  current error.
70
71## v1.2.0
72
73- Support tracking stacktrace of sessionPool.take() that allows the user
74  to instruct the session pool to keep track of the stacktrace of each
75  goroutine that checks out a session from the pool. This is disabled by
76  default, but it can be enabled by setting
77  `SessionPoolConfig.TrackSessionHandles: true`.
78- Add resource-based routing that includes a step to retrieve the
79  instance-specific endpoint before creating the session client when
80  creating a new spanner client. This is disabled by default, but it can
81  be enabled by setting `GOOGLE_CLOUD_SPANNER_ENABLE_RESOURCE_BASED_ROUTING`.
82- Make logger configurable so that the Spanner client can now be configured to
83  use a specific logger instead of the standard logger.
84- Support encoding custom types that point back to supported basic types.
85- Allow decoding Spanner values to custom types that point back to supported
86  types.
87
88## v1.1.0
89
90- The String() method of NullString, NullTime and NullDate will now return
91  an unquoted string instead of a quoted string. This is a BREAKING CHANGE.
92  If you relied on the old behavior, please use fmt.Sprintf("%q", T).
93- The Spanner client will now use the new BatchCreateSessions RPC to initialize
94  the session pool. This will improve the startup time of clients that are
95  initialized with a minimum number of sessions greater than zero
96  (i.e. SessionPoolConfig.MinOpened>0).
97- Spanner clients that are created with the NewClient method will now default
98  to a minimum of 100 opened sessions in the pool
99  (i.e. SessionPoolConfig.MinOpened=100). This will improve the performance
100  of the first transaction/query that is executed by an application, as a
101  session will normally not have to be created as part of the transaction.
102  Spanner clients that are created with the NewClientWithConfig method are
103  not affected by this change.
104- Spanner clients that are created with the NewClient method will now default
105  to a write sessions fraction of 0.2 in the pool
106  (i.e. SessionPoolConfig.WriteSessions=0.2).
107  Spanner clients that are created with the NewClientWithConfig method are
108  not affected by this change.
109- The session pool maintenance worker has been improved so it keeps better
110  track of the actual number of sessions needed. It will now less often delete
111  and re-create sessions. This can improve the overall performance of
112  applications with a low transaction rate.
113
114## v1.0.0
115
116This is the first tag to carve out spanner as its own module. See:
117https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
118