Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid design doc/view creation when already present #3119
Currently Sync Gateway will attempt to create design docs/views on startup, and rely on the view engine on Couchbase Server to identify duplicates.
This creates unwanted work on Couchbase Server, and has the potential for more serious view engine issues in conjunction with issues like https://issues.couchbase.com/browse/MB-16737.
It should be possible for Sync Gateway to stamp design docs with a version number, and check for that version on existing design docs before attempting to recreate.
We should consider enhancing Sync Gateway to follow this approach on startup, until we move to GSI.