MCPcopy Create free account
hub / github.com/couchbase/cbft / clusterCompatibleForVersion

Method clusterCompatibleForVersion

version.go:165–180  ·  view source on GitHub ↗

clusterCompatibleForVersion checks whether a compatible cluster found If not, then it checks whether the current cluster compatibility version is greater than or equal the given app version.

(
	version string)

Source from the content-addressed store, hash-verified

163// If not, then it checks whether the current cluster compatibility
164// version is greater than or equal the given app version.
165func (vt *clusterVersionTracker) clusterCompatibleForVersion(
166 version string) bool {
167 // if already a compatible cluster found then exit early to
168 // avoid compatibility version parsing.
169 if atomic.LoadInt32(&vt.found) == 1 {
170 return true
171 }
172
173 givenVersion, err := cbgt.CompatibilityVersion(version)
174 if err == nil && vt.clusterVersion != 0 &&
175 vt.clusterVersion >= givenVersion {
176 return true
177 }
178
179 return false
180}
181
182func getEffectiveClusterVersion(server string) (uint64, error) {
183 if len(server) < 2 {

Callers 3

PrepareIndexDefFunction · 0.80
getRemoteClientsFunction · 0.80
ServeHTTPMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected