Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Gregory Newman-Smith
Gregory Newman-SmithReporter
Tor Colvin
Tor ColvinStory Points
2
Sprint
None
Fix versions
Priority
Instabug
Open Instabug
PagerDuty
PagerDuty
Sentry
Sentry
Zendesk Support
Zendesk Support
Created May 29, 2024 at 3:41 PM
Updated July 23, 2024 at 3:53 PM
Resolved July 23, 2024 at 3:53 PM
When creating a Sync Gateway database with a large number of collections, waiting for the indexes could time out becoming available. The timeout is 15 minutes per collection, which seemed pretty generous at the time. In https://couchbasecloud.atlassian.net/browse/AV-77598, this was after 486 collections. The behavior was as follows:
Create /db/ will
offline:true
wait for some period of time, long enough for the index creation to time out
PUT /db/_config
offline: false
, this call now becomes synchronous and acquiresServerContext.lock
. This will take ~15 minutes if the indexes are still unable, so other calls are blocking.We can avoid this problem by having an indefinite retry for waiting for collections when starting asynchronously https://github.com/couchbase/sync_gateway/blob/d106b462d66d2fea6891691a2b73a744530546fc/base/collection_n1ql_common.go#L549. We also want to make this goroutine exit if the context is cancelled https://github.com/couchbase/sync_gateway/blob/d106b462d66d2fea6891691a2b73a744530546fc/rest/database_init_manager.go#L237