During programatical database creation, bucket reaches bugged state, in which new scopes and collections are unreachable
Description
Components
Affects versions
Fix versions
Labels
Environment
None
Link to Log File, atop/blg, CBCollectInfo, Core dump
None
Release Notes Description
None
Attachments
1
- 23 Jun 2023, 08:15 AM
Activity
Pierre Regazzoni July 17, 2023 at 2:14 PM
Verified on 7.2.1-5857
+ /opt/couchbase/bin/couchbase-cli bucket-delete -c localhost --username Administrator --password password --bucket bucket00
ERROR: Bucket not found
+ /opt/couchbase/bin/couchbase-cli bucket-delete -c localhost --username Administrator --password password --bucket bucket10
SUCCESS: Bucket deleted
+ /opt/couchbase/bin/couchbase-cli bucket-create -c localhost -u Administrator -p password --bucket bucket10 --bucket-type couchbase --bucket-ramsize 100 --bucket-replica 0
SUCCESS: Bucket created
+ /opt/couchbase/bin/cbq -u Administrator -p password -s 'create primary index on bucket10'
Connected to : http://localhost:8091/. Type Ctrl-D or \QUIT to exit.
Path to history file for the shell : /root/.cbq_history
create primary index on bucket10
{
"requestID": "e59dfab1-6d1f-4bc0-8a64-f27c641ec5e5",
"signature": null,
"results": [
],
"status": "success",
"metrics": {
"elapsedTime": "444.213385ms",
"executionTime": "444.054953ms",
"resultCount": 0,
"resultSize": 0,
"serviceLoad": 6
}
}
+ /opt/couchbase/bin/cbq -u Administrator -p password -s 'select * from bucket10'
Connected to : http://localhost:8091/. Type Ctrl-D or \QUIT to exit.
Path to history file for the shell : /root/.cbq_history
select * from bucket10
{
"requestID": "715fa7e4-92e6-4426-903f-fb3b68915c70",
"signature": {
"*": "*"
},
"results": [
],
"status": "success",
"metrics": {
"elapsedTime": "3.79213ms",
"executionTime": "3.667153ms",
"resultCount": 0,
"resultSize": 0,
"serviceLoad": 6
}
}
+ /opt/couchbase/bin/cbq -u Administrator -p password -s 'select * from bucket00'
Connected to : http://localhost:8091/. Type Ctrl-D or \QUIT to exit.
Path to history file for the shell : /root/.cbq_history
select * from bucket00
{
"requestID": "5b655fce-06c8-45ad-ac2e-532dbb656c8b",
"errors": [
{
"code": 12003,
"msg": "Keyspace not found in CB datastore: default:bucket00 - cause: No bucket named bucket00"
}
],
"status": "fatal",
"metrics": {
"elapsedTime": "42.847076ms",
"executionTime": "42.734779ms",
"resultCount": 0,
"resultSize": 0,
"serviceLoad": 6,
"errorCount": 1
}
}
ERROR 174 : Request failed with error code 500.
+ /opt/couchbase/bin/couchbase-cli collection-manage -c localhost -u Administrator -p password --bucket bucket10 --create-scope scope1
SUCCESS: Scope created
+ /opt/couchbase/bin/couchbase-cli collection-manage -c localhost -u Administrator -p password --bucket bucket10 --create-collection scope1.collection1
SUCCESS: Collection created
+ sleep 3
+ /opt/couchbase/bin/cbq -u Administrator -p password -s 'select * from system:keyspaces'
Connected to : http://localhost:8091/. Type Ctrl-D or \QUIT to exit.
Path to history file for the shell : /root/.cbq_history
select * from system:keyspaces
{
"requestID": "49f10ef8-37a4-4f3e-b600-c5b65ae4883a",
"signature": {
"*": "*"
},
"results": [
{
"keyspaces": {
"datastore_id": "http://127.0.0.1:8091",
"id": "bucket10",
"name": "bucket10",
"namespace": "default",
"namespace_id": "default",
"path": "default:bucket10"
}
},
{
"keyspaces": {
"bucket": "bucket10",
"datastore_id": "http://127.0.0.1:8091",
"id": "collection1",
"name": "collection1",
"namespace": "default",
"namespace_id": "default",
"path": "default:bucket10.scope1.collection1",
"scope": "scope1"
}
},
{
"keyspaces": {
"datastore_id": "http://127.0.0.1:8091",
"id": "default",
"name": "default",
"namespace": "default",
"namespace_id": "default",
"path": "default:default"
}
}
],
"status": "success",
"metrics": {
"elapsedTime": "21.914466ms",
"executionTime": "21.801813ms",
"resultCount": 3,
"resultSize": 894,
"serviceLoad": 6
}
}
CB robot July 7, 2023 at 3:32 PM
Build couchbase-server-7.2.1-5841 contains query commit 6a8b504 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-57586#icft=MB-57586 [BP 56816] Revise fix
CB robot July 5, 2023 at 1:12 PM
Build couchbase-server-7.2.1-5836 contains query commit e366771 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-57586#icft=MB-57586 [BP 56816] Serialise pool refresh & keyspace addition
CB robot June 27, 2023 at 7:03 AM
Build couchbase-server-7.2.1-5822 contains query commit 71a3e3b with commit message:
https://couchbasecloud.atlassian.net/browse/MB-57586#icft=MB-57586 [BP 56816] Ensure bucket updater is started when reloading the namespace.
Donald Haggart June 25, 2023 at 1:45 PM
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Pierre RegazzoniPierre RegazzoniReporter
Horváth MartinHorváth MartinIs this a Regression?
YesTriage
UntriagedStory Points
0Priority
MajorInstabug
Open Instabug
Details
Details
Assignee
Pierre Regazzoni
Pierre RegazzoniReporter
Horváth Martin
Horváth MartinIs this a Regression?
Yes
Triage
Untriaged
Story Points
0
Priority
Instabug
Open Instabug
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

PagerDuty Incident
Sentry
Linked Issues
Sentry
Linked Issues
Sentry
Linked Issues
Zendesk Support
Linked Tickets
Zendesk Support
Linked Tickets
Zendesk Support

Linked Tickets
Created June 23, 2023 at 8:16 AM
Updated August 31, 2024 at 11:06 AM
Resolved June 27, 2023 at 8:57 AM
Instabug
Related forum post with detailed explanation:
during-programatical-database-creation-bucket-reaches-bugged-state-in-which-new-scopes-and-collections-are-unreachable
Attached test file to reproduce the bug.