Details
-
Bug
-
Resolution: Fixed
-
Critical
-
Cheshire-Cat
-
Untriaged
-
1
-
Yes
Description
CBS Version: 7.0.0-3154
*Steps to Reproduce: *
1. Set up Couchbase server with bucket. 'bucket-1'
2. Set up two sync gateways and have sync gateway connected to same bucket
3. Start both. the sync gateways
Actual Result:
1. Sync gateway fails to start as indexes are not creaated on the server
Gist of Sgw logs :
2020-09-22T09:16:15.248-07:00 [WRN] Error when querying index using statement: [SELECT meta(`data-bucket`).xattrs._sync.access.foo as val FROM `data-bucket` WHERE ANY op in OBJECT_PAIRS(meta(`data-bucket`).xattrs._sync.access) SATISFIES op.name = 'foo' end LIMIT 1] parameters: [<nil>] error:[4000] No index available on keyspace data-bucket that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online. -- base.(*CouchbaseBucketGoCB).Query() at bucket_n1ql.go:75 |
2020-09-22T09:16:15.248-07:00 [INF] Error waiting for index "sg_access_x1" to be ready for bucket "data-bucket" - retrying... |
2020-09-22T09:16:15.370-07:00 [WRN] Error when querying index using statement: [SELECT [op.name, LEAST(meta(`data-bucket`).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null), IFMISSING(op.val.del,null)][1] AS sequence FROM `data-bucket` UNNEST OBJECT_PAIRS(meta(`data-bucket`).xattrs._sync.channels) AS op WHERE [op.name, LEAST(meta(`data-bucket`).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null), IFMISSING(op.val.del,null)] BETWEEN ['foo', 0] AND ['foo', 1] ORDER BY [op.name, LEAST(meta(`data-bucket`).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null),IFMISSING(op.val.del,null)] LIMIT 1] parameters: [<nil>] error:[4000] No index available on keyspace data-bucket that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online. -- base.(*CouchbaseBucketGoCB).Query() at bucket_n1ql.go:75 |
2020-09-22T09:16:15.370-07:00 [INF] Error waiting for index "sg_channels_x1" to be ready for bucket "data-bucket" - retrying... |
2020-09-22T09:16:20.250-07:00 [WRN] Error when querying index using statement: [SELECT meta(`data-bucket`).xattrs._sync.access.foo as val FROM `data-bucket` WHERE ANY op in OBJECT_PAIRS(meta(`data-bucket`).xattrs._sync.access) SATISFIES op.name = 'foo' end LIMIT 1] parameters: [<nil>] error:[4000] No index available on keyspace data-bucket that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online. -- base.(*CouchbaseBucketGoCB).Query() at bucket_n1ql.go:75 |
2020-09-22T09:16:20.250-07:00 [INF] Error waiting for index "sg_access_x1" to be ready for bucket "data-bucket" - retrying... |
2020-09-22T09:16:20.251-07:00 [WRN] Error when querying index using statement: [SELECT meta(`data-bucket`).xattrs._sync.role_access.foo as val FROM `data-bucket` WHERE ANY op in OBJECT_PAIRS(meta(`data-bucket`).xattrs._sync.role_access) SATISFIES op.name = 'foo' end LIMIT 1] parameters: [<nil>] error:[4000] No index available on keyspace data-bucket that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online. -- base.(*CouchbaseBucketGoCB).Query() at bucket_n1ql.go:75 |
2020-09-22T09:16:20.251-07:00 [INF] Error waiting for index "sg_roleAccess_x1" to be ready for bucket "data-bucket" - retrying... |
2020-09-22T09:16:20.375-07:00 [WRN] Error when querying index using statement: [SELECT [op.name, LEAST(meta(`data-bucket`).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null), IFMISSING(op.val.del,null)][1] AS sequence FROM `data-bucket` UNNEST OBJECT_PAIRS(meta(`data-bucket`).xattrs._sync.channels) AS op WHERE [op.name, LEAST(meta(`data-bucket`).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null), IFMISSING(op.val.del,null)] BETWEEN ['foo', 0] AND ['foo', 1] ORDER BY [op.name, LEAST(meta(`data-bucket`).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null),IFMISSING(op.val.del,null)] LIMIT 1] parameters: [<nil>] error:[4000] No index available on keyspace data-bucket that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online. -- base.(*CouchbaseBucketGoCB).Query() at bucket_n1ql.go:75 |
Expected Result:
Though it is one or two sync gateways, it should start successfully
SGW config :
{
|
"interface":":4984", |
"adminInterface": "0.0.0.0:4985", |
"maxIncomingConnections": 0, |
"maxFileDescriptors": 90000, |
"compressResponses": false, |
|
|
"logging": {"debug": {"enabled": true} }, |
"databases":{ |
"db":{ |
"num_index_replicas": 0, |
"username": "data-bucket", |
"password": "password", |
"enable_shared_bucket_access": true, |
"import_docs": false, |
"server":"http://172.23.106.187:8091", |
"bucket":"data-bucket" |
}
|
}
|
}
|
Logs :
SGW LOGS: sgcollect info : sgcollect_info_topology_indexer_new_1.zip
SGW node2 logs : sgcollect-topology-indexer-new.zip
CBS LOGS: cbcollect_info: cbcollect_topology_index-new.zip
*What is the last build this test passed: *7.0.0-3119
Note : It worked fine with last week Cheshire cat build
Attachments
Issue Links
- is cloned by
-
MB-42788 Creating Index fails when two sync gateways starts on same bucket of server
- Closed