Skip to content

Commit afc8e1d

Browse files
committed
CBG-5500: remove unused useXattrs/KvTLSPort
1 parent d8545a9 commit afc8e1d

7 files changed

Lines changed: 2 additions & 27 deletions

File tree

base/bucket.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ type BucketSpec struct {
116116
Auth AuthHandler
117117
Certpath, Keypath, CACertPath string // X.509 auth parameters
118118
TLSSkipVerify bool // Use insecureSkipVerify when secure scheme (couchbases) is used and cacertpath is undefined
119-
KvTLSPort int // Port to use for memcached over TLS. Required for cbdatasource auth when using TLS
120-
UseXattrs bool // Whether to use xattrs to store _sync metadata. Used during view initialization
121119
ViewQueryTimeoutSecs *uint32 // the view query timeout in seconds (default: 75 seconds)
122120
MaxConcurrentQueryOps *int // maximum number of concurrent query operations (default: DefaultMaxConcurrentQueryOps)
123121
BucketOpTimeout *time.Duration // How long bucket ops should block returning "operation timed out". If nil, uses GoCB default. GoCB buckets only.
@@ -302,16 +300,6 @@ func GetBucket(ctx context.Context, spec BucketSpec) (bucket Bucket, err error)
302300
if err != nil {
303301
return nil, err
304302
}
305-
306-
// If XATTRS are enabled via enable_shared_bucket_access config flag, assert that Couchbase Server is 5.0
307-
// or later, otherwise refuse to connect to the bucket since pre 5.0 versions don't support XATTRs
308-
if spec.UseXattrs {
309-
if !bucket.IsSupported(sgbucket.BucketStoreFeatureXattrs) {
310-
WarnfCtx(ctx, "If using XATTRS, Couchbase Server version must be >= 5.0.")
311-
return nil, ErrFatalBucketConnection
312-
}
313-
}
314-
315303
}
316304

317305
// TODO: CBG-2529 - LoggingBucket has been removed - pending a new approach to logging all bucket operations

base/leaky_datastore.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ func (lds *LeakyDataStore) GetSpec() BucketSpec {
393393
// Return a minimal struct:
394394
return BucketSpec{
395395
BucketName: lds.bucket.GetName(),
396-
UseXattrs: true,
397396
}
398397
}
399398
}

base/main_test_bucket_pool_util.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ func getTestBucketSpec(clusterSpec CouchbaseClusterSpec, testBucketName tbpBucke
5353
Username: clusterSpec.Username,
5454
Password: TestClusterPassword(),
5555
},
56-
UseXattrs: TestUseXattrs(),
5756
BucketName: string(testBucketName),
5857
TLSSkipVerify: clusterSpec.TLSSkipVerify,
5958
// use longer timeout than DefaultBucketOpTimeout to avoid timeouts in test harness from using buckets after flush, which takes some time to reinitialize

docs/api/components/schemas.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,8 @@ Database:
13181318
description: The key path (private key) for X.509 bucket auth
13191319
type: string
13201320
kv_tls_port:
1321-
description: The Memcached TLS port.
1321+
description: The Memcached TLS port. This value is ignored, a port has to be specified in the connection string.
1322+
deprecated: true
13221323
type: integer
13231324
default: 11207
13241325
local_doc_expiry_secs:

rest/config.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ func (dc *DbConfig) MakeBucketSpec(server string) base.BucketSpec {
112112
bc := &dc.BucketConfig
113113

114114
bucketName := ""
115-
tlsPort := 11207
116115

117116
// treat all walrus: as in memory storage, any persistent storage would have to be converted to rosmar
118117
if strings.HasPrefix(server, "walrus:") {
@@ -123,17 +122,12 @@ func (dc *DbConfig) MakeBucketSpec(server string) base.BucketSpec {
123122
bucketName = *bc.Bucket
124123
}
125124

126-
if bc.KvTLSPort != 0 {
127-
tlsPort = bc.KvTLSPort
128-
}
129-
130125
return base.BucketSpec{
131126
Server: server,
132127
BucketName: bucketName,
133128
Keypath: bc.KeyPath,
134129
Certpath: bc.CertPath,
135130
CACertPath: bc.CACertPath,
136-
KvTLSPort: tlsPort,
137131
Auth: bc,
138132
MaxConcurrentQueryOps: bc.MaxConcurrentQueryOps,
139133
}

rest/server_context.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -686,11 +686,6 @@ func GetBucketSpec(ctx context.Context, config *DatabaseConfig, serverConfig *St
686686
spec.ViewQueryTimeoutSecs = config.ViewQueryTimeoutSecs
687687
}
688688

689-
spec.UseXattrs = config.UseXattrs()
690-
if !spec.UseXattrs {
691-
base.WarnfCtx(ctx, "Running Sync Gateway without shared bucket access is deprecated. Recommendation: set enable_shared_bucket_access=true")
692-
}
693-
694689
if config.BucketOpTimeoutMs != nil {
695690
operationTimeout := time.Millisecond * time.Duration(*config.BucketOpTimeoutMs)
696691
spec.BucketOpTimeout = &operationTimeout

rest/server_context_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ func bucketConfigFromTestBucket(tb *base.TestBucket) BucketConfig {
221221
CertPath: tb.BucketSpec.Certpath,
222222
KeyPath: tb.BucketSpec.Keypath,
223223
CACertPath: tb.BucketSpec.CACertPath,
224-
KvTLSPort: tb.BucketSpec.KvTLSPort,
225224
}
226225
}
227226

0 commit comments

Comments
 (0)