3.0.0 — February, 2022
https://docs.couchbase.com/sync-gateway/3.0/release-notes.html#lbl-rel300
Caution: Sync Gateway 3.0 introduces some breaking changes.
If you are upgrading from 2.x, please refer to the Upgrading page. The migration to 3.0 configuration is a ONE WAY process.
Overview of Sync Gateway 3.0
This release of Sync Gateway introduces significant strategic new features and enhancements aimed at boosting the functionality supporting mobile and edge computing solutions.
Most significant are the major architectural enhancements to make sync gateway node configuration simpler, more modular and cluster-aware. The secure, encrypted, REST API endpoints now support persistent configuration changes to simplify management and administration.
New Features
Centralized Persistent Modular Configuration
Centralized Persistent Modular Configuration is a core enhancement that makes it simpler for administrators to configure and manage the Sync Gateway.
This enhancement removes reliance on monolithic JSON configuration files whilst providing a modular and cluster-aware approach to Sync Gateway node configuration.
Basic startup configuration settings bootstrap your Sync Gateway nodes and securely connect them to a Couchbase Server. Configuration of cluster-wide Sync Gateway databases, access control policies and inter-Sync Gateway replications is then provided using the Admin REST API.
Secure Administration
This major enhancement complements the introduction of the centralized persistent configuration by introducing secure administration of a cluster through the Admin REST API.
The Admin REST API now enforces authentication and role-based access control by default.
TLS Encryption Enabled by Default
The default enabling of secure TLS connections for all Couchbase Server, Client and REST API communication ensures that all communication is encrypted; enforcing and encouraging security best practices.
User Defined Extended Attributes(XAttrs) for Access Control
Use extended attributes (metadata) to avoid the need to embed sensitive access grant information such as channels and roles within document bodies.
This key architectural enhancement enforces separation of concerns by providing you the option to use Extended Attributes (XATTRs) to specify channel access grants outside of your document bodies.
Auto-Purge on Channel Access Revocation in Inter-Sync Gateway Replication
This enhancement to inter-Sync Gateway replication technology helps with the enforcement of data privacy and governance in complex workflows.
Use Environment Variables in Configuration File
Sync Gateway configuration is extended to allow the use of defined environment variables as substitution values inside the configuration file. This allows users to determine, pick-up and substitute appropriate values during Sync Gateway start-up.
Enhancements
Compacting
Attachments added post 3.0 are automatically removed from the bucket upon reference removal, document delete or document purge.
The {db}/_compact
API includes an option to remove any redundant pre-3.0 attachments.
Resync
The _resync
process has been enhanced to better handle large datasets, minimizing timeout and out-of-memory issues. The process now runs asynchronously, uses query pagination and supports sequence regeneration.
Other Enhancements
- CBG-1760 - Error upfront when the configured logFilePath is not writable
- CBG-1705 - ew op' on results close
- CBG-1672 - Return 422 status for unprocessible deltas instead of 404 to use non-delta retry handling
- CBG-1664 - Validate javascript syntax in DbConfig.validate()
- CBG-1643 - Add additional context for gocb errors when using self-signed cert
- CBG-1590 - Retrieve existing doc metadata prior to calling downloadOrVerifyAttachments
- CBG-1558 - panic after failed unmarshal in GetDeepMutableBody
- CBG-1473 - Enable log redaction by default
- CBG-1424 - discoverInterfaceName should resolve hostnames before trying to find network interface stats using IP addresses
- CBG-1391 - Treat existing cbgt index as recoverable error
- CBG-1390 - Add warning threshold for excessively large number of channels per user
- CBG-1359 - Increase default minimum TLS version TLS1.2
- CBG-1343 - Increase initial wait time for index creation retry
- CBG-1342 - Avoid retry on 'duplicate index name' index creation error
- CBG-1326 - Log if channels expand to a smaller set than requested
- CBG-1301 - Persistent Config
- CBG-1284 - Mobile Attachment Cleanup
- CBG-1282 - XATTRS Access Grants
- CBG-1280 - Channel Access Revocation
- CBG-1273 - Add Prometheus alert examples
- CBG-1253 - Add USE INDEX to index readiness queries
- CBG-1251 - Support Apple (M1) Silicon
- CBG-1245 - Include channel name in validfrom logging
- CBG-1217 - Ensure change listener goroutines terminates (both Tap and DCP feeds) before the server is stopped
- CBG-1170 - Upgrade to go 1.15
- CBG-1127 - Treat resurrected tombstones as non-conflict when no shared history
- CBG-949 - Improve error when non-upgradable HTTP request is sent to _blipsync endpoint
- CBG-841 - Force users to opt in to accepting unsigned tokens from providers in SG’s provider config.
- CBG-715 - High CPU usage in high volume basic auth scenarios
- CBG-641 - Admin API Auth
- CBG-551 - Avoid storing _removed:true revision bodies in the revision cache
Issues and Resolutions
Known Issues
- CBG-798 - Sync Gateway requires Couchbase Server nodes to use the same SSL memcached port
- CBG-1953 - Console logging not being enabled when only a log key set
Fixed Issues
- CBG-1439 - database.abandoned_seqs stat is unused
- CBG-1438 - SgwIntStat.SetIfMax incorrectly sums old and new values
- CBG-1428 - ISGR should ignore _removed:true bodies when purgeOnRemoval is disabled
- CBG-1427 - ISGR should not try sending a delta when deltaSrc is a tombstone
- CBG-1412 - JSON strings in some responses not being correctly escaped
- CBG-1388 - sg_collect does not package archived log files (*.log.gz)
- CBG-1376 - Some Delta Sync errors logged at WARN level should be DEBUG
- CBG-1339 - Creating mobile tombstone for existing CBS tombstone causes loop
- CBG-1335 - Mutating _rev on localDocument in conflict resolver results in merge error
- CBG-1325 - Incorrect email validation (too strict)
- CBG-1304 - ISGR: Pull replications incompatible with active-side allow_conflicts=false
- CBG-1246 - Changes limit incorrectly applied in case of CBG-946
- CBG-1231 - Prevent import cfg startup races
- CBG-1200 - Calling DELETE on a non-existent document creates a tombstone with empty body
- CBG-1172 - ISGR credentials with characters requiring URL encoding cause blipsync to fail
- CBG-1161 - DefaultPurgeInterval specified in days and used as though in hours
- CBG-1113 - CBL1.x/Websocket based changes feeds leak goroutine on disconnect
- CBG-789 - Updating a blob with new data does not update SG’s metadata on sync