1# Changes 2 3## v1.2.1 4 5- Fix session leakage for ApplyAtLeastOnce. Previously session handles where 6 leaked whenever Commit() returned a non-abort, non-session-not-found error, 7 due to a missing recycle() call. 8- Fix error for WriteStruct with pointers. This fixes a specific check for 9 encoding and decoding to pointer types. 10- Fix a GRPCStatus issue that returns a Status that has Unknown code if the 11 base error is nil. Now, it always returns a Status based on Code field of 12 current error. 13 14## v1.2.0 15 16- Support tracking stacktrace of sessionPool.take() that allows the user 17 to instruct the session pool to keep track of the stacktrace of each 18 goroutine that checks out a session from the pool. This is disabled by 19 default, but it can be enabled by setting 20 `SessionPoolConfig.TrackSessionHandles: true`. 21- Add resource-based routing that includes a step to retrieve the 22 instance-specific endpoint before creating the session client when 23 creating a new spanner client. This is disabled by default, but it can 24 be enabled by setting `GOOGLE_CLOUD_SPANNER_ENABLE_RESOURCE_BASED_ROUTING`. 25- Make logger configurable so that the Spanner client can now be configured to 26 use a specific logger instead of the standard logger. 27- Support encoding custom types that point back to supported basic types. 28- Allow decoding Spanner values to custom types that point back to supported 29 types. 30 31## v1.1.0 32 33- The String() method of NullString, NullTime and NullDate will now return 34 an unquoted string instead of a quoted string. This is a BREAKING CHANGE. 35 If you relied on the old behavior, please use fmt.Sprintf("%q", T). 36- The Spanner client will now use the new BatchCreateSessions RPC to initialize 37 the session pool. This will improve the startup time of clients that are 38 initialized with a minimum number of sessions greater than zero 39 (i.e. SessionPoolConfig.MinOpened>0). 40- Spanner clients that are created with the NewClient method will now default 41 to a minimum of 100 opened sessions in the pool 42 (i.e. SessionPoolConfig.MinOpened=100). This will improve the performance 43 of the first transaction/query that is executed by an application, as a 44 session will normally not have to be created as part of the transaction. 45 Spanner clients that are created with the NewClientWithConfig method are 46 not affected by this change. 47- Spanner clients that are created with the NewClient method will now default 48 to a write sessions fraction of 0.2 in the pool 49 (i.e. SessionPoolConfig.WriteSessions=0.2). 50 Spanner clients that are created with the NewClientWithConfig method are 51 not affected by this change. 52- The session pool maintenance worker has been improved so it keeps better 53 track of the actual number of sessions needed. It will now less often delete 54 and re-create sessions. This can improve the overall performance of 55 applications with a low transaction rate. 56 57## v1.0.0 58 59This is the first tag to carve out spanner as its own module. See: 60https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository. 61