diff --git a/.golangci.yaml b/.golangci.yaml index 33bb47b3e0..b43218d960 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -18,16 +18,16 @@ linters-settings: linters: disable-all: true enable: + - deadcode + - depguard - gocyclo - gofmt - goimports - - golint - - megacheck - - misspell - govet - - depguard - - deadcode - ineffassign + - megacheck + - misspell + - revive - varcheck # TODO(gbelvin): write license linter and commit to upstream. # ./scripts/check_license.sh is run by ./scripts/presubmit.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 17e0f83233..4aec2bf205 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,12 @@ * #2568: Allow disabling the writes of ephemeral nodes to storage via the `--tree_ids_with_no_ephemeral_nodes` flag to the sequencer. +* #2748: `--cloudspanner_max_burst_sessions` deprecated (it hasn't had any + effect for a while, now it's more explicit) ### Dependency updates + +* Updated golangci-lint to v1.46.1 (developers should update to this version) * Removed dependency on certificate-transparency-go ## v1.4.1 diff --git a/README.md b/README.md index b78162e144..247cf8562a 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ and tests over the codebase. #### Install [golangci-lint](https://github.com/golangci/golangci-lint#local-installation). ```bash -go install github.com/golangci/golangci-lint/cmd/golangci-lint +go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.1 ``` #### Run code generation, build, test and linters diff --git a/integration/cloudbuild/testbase/Dockerfile b/integration/cloudbuild/testbase/Dockerfile index c810d6254b..284071e793 100644 --- a/integration/cloudbuild/testbase/Dockerfile +++ b/integration/cloudbuild/testbase/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y \ xxd # Install golangci-lint. See docs at: https://golangci-lint.run/usage/install/. -RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.1 RUN mkdir protoc && \ (cd protoc && \ diff --git a/storage/cloudspanner/storage_provider.go b/storage/cloudspanner/storage_provider.go index 2dc67a512e..335039fc0d 100644 --- a/storage/cloudspanner/storage_provider.go +++ b/storage/cloudspanner/storage_provider.go @@ -37,13 +37,13 @@ var ( csSessionMaxOpened = flag.Uint64("cloudspanner_max_open_sessions", 0, "Max open sessions.") csSessionMinOpened = flag.Uint64("cloudspanner_min_open_sessions", 0, "Min open sessions.") csSessionMaxIdle = flag.Uint64("cloudspanner_max_idle_sessions", 0, "Max idle sessions.") - csSessionMaxBurst = flag.Uint64("cloudspanner_max_burst_sessions", 0, "Max concurrent create session requests.") csSessionWriteSessions = flag.Float64("cloudspanner_write_sessions", 0, "Fraction of write capable sessions to maintain.") csSessionHCWorkers = flag.Int("cloudspanner_num_healthcheckers", 0, "Number of health check workers for Spanner session pool.") csSessionHCInterval = flag.Duration("cloudspanner_healthcheck_interval", 0, "Interval betweek pinging sessions.") csSessionTrackHandles = flag.Bool("cloudspanner_track_session_handles", false, "determines whether the session pool will keep track of the stacktrace of the goroutines that take sessions from the pool.") csDequeueAcrossMerkleBucketsFraction = flag.Float64("cloudspanner_dequeue_bucket_fraction", 0.75, "Fraction of merkle keyspace to dequeue from, set to zero to disable.") csReadOnlyStaleness = flag.Duration("cloudspanner_readonly_staleness", time.Minute, "How far in the past to perform readonly operations. Within limits, raising this should help to increase performance/reduce latency.") + _ = flag.Uint64("cloudspanner_max_burst_sessions", 0, "No longer used") csMu sync.RWMutex csStorageInstance *cloudSpannerProvider @@ -81,7 +81,6 @@ func configFromFlags() spanner.ClientConfig { setUint64IfNotDefault(&r.SessionPoolConfig.MaxOpened, *csSessionMaxOpened) setUint64IfNotDefault(&r.SessionPoolConfig.MinOpened, *csSessionMinOpened) setUint64IfNotDefault(&r.SessionPoolConfig.MaxIdle, *csSessionMaxIdle) - setUint64IfNotDefault(&r.SessionPoolConfig.MaxBurst, *csSessionMaxBurst) setFloat64IfNotDefault(&r.SessionPoolConfig.WriteSessions, *csSessionWriteSessions) setIntIfNotDefault(&r.SessionPoolConfig.HealthCheckWorkers, *csSessionHCWorkers) r.SessionPoolConfig.TrackSessionHandles = *csSessionTrackHandles