Skip to content

Releases: couchbase/sync_gateway

3.0.0 — February, 2022

23 Feb 15:10
46803d1
Compare
Choose a tag to compare

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

Sync Gateway 2.8.3 - October, 2021

29 Oct 13:28
e54a627
Compare
Choose a tag to compare

https://docs.couchbase.com/sync-gateway/2.8/release-notes.html#lbl-rel283

Tip: Users of earlier Sync Gateway releases should plan to upgrade to this release at the earliest opportunity.

Issues and Resolutions

Enhancements

  • CBG-1665 - Limit the number of open N1QL connections
  • CBG-1444 - discoverInterfaceName should resolve hostnames before trying to find network interface stats using IP addresses

Known Issues

  • CBG-798 — Sync Gateway requires Couchbase Server nodes to use the same SSL memcached port

Fixed Issues

  • CBG-1725 - ISGR Pull checkpoint sequences unreliable
  • CBG-1724 - Incorrect email validation (too strict)
  • CBG-1723 - CBL1.x/Websocket based changes feeds leak goroutine on disconnect
  • CBG-1717 - norev message sequence has wrong property name
  • CBG-1696 - Empty query results when using bypass channel cache
  • CBG-1543 - Metrics API port should not serve public API routes
  • CBG-1454 - ISGR: filtered push replication replicates channel removal revisions
  • CBG-1451 - SgwIntStat.SetIfMax incorrectly sums old and new values
  • CBG-1379 - Retry OIDC client initialization when the provider is not reachable
  • CBG-1362 - Fix cacert-only handling for DCP connection

Sync Gateway 2.8.2 - March, 2021

11 Mar 19:59
4df7a2d
Compare
Choose a tag to compare

https://docs.couchbase.com/sync-gateway/2.8/release-notes.html#lbl-rel282

Tip: Users of 2.8.1 should upgrade to this release at the earliest opportunity.

Issues and Resolutions

Release 2.8.2 fixes an issue that could result in Sync Gateway entering an infinite loop when creating a mobile tombstone, if a Couchbase Server tombstone already exists for that key.

Known Issues

  • CBG-798 — Sync Gateway requires Couchbase Server nodes to use the same SSL memcached port
  • CBG-1127 — Treat resurrected tombstones as non-conflict when no shared history

Fixed Issues

  • CBG-1341 — Creating mobile tombstone for existing CBS tombstone causes loop

Sync Gateway 2.8.1 - February, 2021

11 Mar 19:56
0be9ae8
Compare
Choose a tag to compare

https://docs.couchbase.com/sync-gateway/2.8/release-notes.html#lbl-rel281

Note: Release 2.8.1 has now been superseded by Release 2.8.2 (March 2021). Users of 2.8.1 should upgrade to 2.8.2 as soon as practicable.

New Features

Metrics REST API

Release 2.8.1 sees the transition to general availability of Couchbase Sync Gateway’s Metrics REST API, which was introduced as a developer preview in release 2.8.0.

This feature exposes Sync Gateway’s extensive stats in both JSON and Prometheus-compatible format. For more on how to enable the integration of Sync Gateway’s metrics with one of the most popular monitoring and alerting solutions — see: Prometheus Integration

Enhancements

Configuration Changes

Custom Response Headers

It is now possible to remove product versions from Sync Gateway responses using the hide_product_versions setting in the Config file. This customization of responses avoids revealing the version of the Sync Gateway to HTTP requests to the root path — see: Hide Product Version in Headers and CBG-1235

Connection String Overrides

It is now possible to use the server connection string to override the current heuristic-driven behavior for selecting internal/external networking matches — see: Couchbase Server Connection String and CBG-1276

Other Enhancements

  • CBG-1152 — Additional logging context for SGR2 checkpointing
  • CBG-1235 — Customizable HTTP response to ""/"" (suppress headers)"
  • CBG-1254 — Add a new rev option for document_changed event handler
  • CBG-1267 — Exit early from DocChange after running callback for _sync:cfg docs
  • CBG-1270 — Add USE INDEX to index readiness queries
  • CBG-1274 — Add Prometheus alert examples
  • CBG-1276 — Implement network connstr flag for cbdatasource alt address shims

Issues and Resolutions

Known Issues

  • CBG-798 — Sync Gateway requires Couchbase Server nodes to use the same SSL memcached port
  • CBG-1127 — Treat resurrected tombstones as non-conflict when no shared history
  • CBG-1341 — Creating mobile tombstone for existing CBS tombstone causes loop

Fixed Issues

  • CBG-1203 — sgcollect_info not collecting system information
  • CBG-1234 — Prevent import cfg startup races
  • CBG-1252 — Changes limit incorrectly applied in case of CBG-946
  • CBG-1263 — Pre-2.8 cbgt index definitions not being removed post-upgrade
  • CBG-1265 — Missing document in changes feed when using a compound sequence number as since parameter
  • CBG-1311 — ISGR: Pull replications incompatible with active-side allow_conflicts=false

Sync Gateway 2.8.0 - October, 2020

16 Oct 17:48
e2e7d42
Compare
Choose a tag to compare

https://docs.couchbase.com/sync-gateway/2.8/release-notes.html#lbl-rel280

API Changes

This release introduces two new endpoints to the Admin Rest API.

  • _replication - used to initialize Inter-Sync Gateway Replication
  • _replicationStatus - used to set or query the status of a replication
  • The _replicate and _active_tasks endpoints are both deprecated, as they are replaced by the above.

Other Enhancements

  • CBG-1022 — Require replication to be stopped prior to upsert
  • CBG-921 — Ignore transaction ATR documents during DCP processing
  • CBG-905 — Support using custom OIDC claim as Sync Gateway username
  • CBG-880 — Python 3 support for sgcollect
  • CBG-877 — Remove inappropriate logging warning related JSON parsing from ReadJSONFromMIME when request body is empty
  • CBG-876 — Include Bearer prefix when sending token base authentication request in OIDC E2E tests
  • CBG-864 — Improve addJSON-related error handling
  • CBG-821 — Limit on channel queries triggered by 2.x replication
  • CBG-820 — Add state for OIDC auth code authentication
  • CBG-803 — Support for OIDC provider config refresh
  • CBG-802 — Being able to configure OIDC Test Provider with HTTPS
  • CBG-801 — Auto-generated OIDC callback URL should include provider when non-default
  • CBG-800 — OnDemandImportForWrite bypasses migrate handling
  • CBG-752 — sgcollect: Re-gzip rotated logfiles post-redaction, clean up intermediate extracted files
  • CBG-751 — Improve REST-based sgcollect_info options validation
  • CBG-719 — Update OIDC library
  • CBG-714 — Log warning on ignored, invalid channel data
  • CBG-709 — Inter-Sync Gateway Replication
  • CBG-697 — SGW startup routine could use more retry logic while CBS warms up
  • CBG-688 — Improve logging for x.509 connection errors
  • CBG-673 — Include USE INDEX hint with channel queries
  • CBG-665 — Make trace level logging a typical file logger
  • CBG-664 — Enhance trace logging for blip messages
  • CBG-658 — Optimize LogKey string lookup
  • CBG-653 — Add 'norev' BLIP handler to log detailed error information
  • CBG-640 — Wrong content type for _user and _role
  • CBG-633 — Clean up duplicate db definitions in blipHandler/blipSyncContext
  • CBG-630 — Validate whether multiple databases connect to the same bucket
  • CBG-624 — Add database config option for HttpOnly cookies
  • CBG-622 — Use secure cookies when SG is configured to listen over TLS
  • CBG-600 — sgcollect_info TMPDIR setting should be a real argument
  • CBG-585 — Avoid log redaction cost via UD/MD/SD when log-level disabled
  • CBG-581 — Write simple JSON HTTP responses directly as raw bytes
  • CBG-437 — Return error when receiving deltas for deltaSrc revisions which are tombstoned

Known Issues

  • CBG-1127 —  Treat resurrected tombstones as non-conflict when no shared history
  • CBG-798 — Sync Gateway requires Couchbase Server nodes to use the same SSL memcached port

Fixed Issues

  • CBG-1072 — CAS race can result in unordered recentSequences
  • CBG-983 — _all_docs with keys parameter not returning revID
  • CBG-951 — Deleted documents should set _deleted:true for import filter function
  • CBG-946 — Repeated change entries on access grant to doc’s previous channel
  • CBG-926 — User name not being logged for initial HTTP request
  • CBG-819 — Generate empty delta as {} instead of null
  • CBG-812 — Running compact when UseViews=true causes an infinite loop
  • CBG-744 — OldDoc body in sync function for tombstone resurrections does not contain _deleted=true
  • CBG-743 — Doc body in sync function contains _deleted=false
  • CBG-741 — 403 Attachment’s doc not being synced during CBL replication
  • CBG-731 — Channels query performance degradation when using limit
  • CBG-727 — Panic when connecting to non-standard memcached port using couchbase(s):// scheme
  • CBG-695 — Alternate addresses are always used if defined instead of applying heuristic
  • CBG-661 — Errors from REST API produce invalid JSON

Sync Gateway 2.7.3 - May, 2020

15 May 15:16
33d352f
Compare
Choose a tag to compare

https://docs.couchbase.com/sync-gateway/2.7/release-notes.html#2-7-3may-2020

Fixed at this Release

  • CBG-816 - #4566 Bump gocbconnstr dependency to uptake SRV support
    • Update Sync Gateway references to pick-up the latest version of gocbconnstr, to ensure connection to servers using SRV records.

CBG-749 Backport CBG-471 to 2.7.2 - Pre-2.5 _attachment migration (#4…

12 May 23:02
583d2dc
Compare
Choose a tag to compare
…528) (#4535)

* Unit test repro

* Update test

Return hasPre25Attachments bool from revcache for upgrade case

fix _attachment in test

wip

Remove write part of attachment meta (rely on in-memory moving on each read)

Remove debug

Return error instead of panic

Reorder teardown to prevent panics using walrus

Improve comments, extra assertions on doc syncData

Remove unnecessary changes

* Reuse inject/MergeAttachment functions when injecting attachments into bodyBytes, add new tests to support mixed pre-2.5 and 2.5 meta

* Update to centralise attachment handling in getRevision

Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>

Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>

2.5.0 — April 2019

15 Jun 11:25
Compare
Choose a tag to compare

As part of this release we had 55 issues closed.

Performance Improvements

  • #3662 Collate high-volume logs for improved throughput
  • #3667 Move _attachments metadata to _sync
  • #3766 Independent timing for skipped sequence processing and cache age-out process
  • #3823 Avoid CPU spikes when abandoning skipped sequences
  • #3862 Improve channel query queueing

Enhancements

  • #3558 Initialize cache after DCP start
  • #3609 Add validation to limit log file max_size
  • #3677 Make bcrypt cost configurable
  • #3791 sgcollect_info: Proxy server support using --upload_proxy
  • #3792 Ensure consistent use of http.DefaultTransport
  • #3798 Report parameters on N1QL errors
  • #3815 Include db and handler context in all db-specific logging
  • #3833 CouchbaseServerVersion should use cluster_compat_version
  • CBG-268 Limit DCP checkpoint persistency frequency
  • CBG-247 Reduce CPU associated with large skipped sequence queue
  • CBG-233 Improve efficiency of pending sequences processing

Bugs

  • #3414 auth.Save() should be CAS safe
  • #3783 Large Number Handled Incorrectly
  • MB-32044 cbdatasource workers retry removed nodes indefinitely
  • #3838 Failed resync doesn’t revert db state to offline
  • #3839 n1ql query timeout should be set at both bucket and cluster level
  • #3872 Channel cache prepend can fail for some seq, validFrom combinations
  • #3898 Avoid nested read locks on BucketLock
  • CBG-282 Panic when putting document with duplicate non-imported doc ID
  • CBG-278 Sync Gateway panic when stopping 2.0 pull replication with attachments
  • CBG-230 _changes with include_docs=true errors on _user pseudo docs
  • CBG-197 Change default console logging behaviour
  • CBG-234 Prevent N1QL injection in Sync Gateway via _all_docs with startkey and endkey querystring options

Known Issues

  • #1264 Sync Gateway memory usage can climb continously is scenarios with ever increasing numbers of channels
  • CBG-394 Upgrade to shared_bucket_access with GSI can cause missed mutations

Where to get it

You can download this release from Couchbase.com

2.1.1

15 Jun 11:26
fea9947
Compare
Choose a tag to compare

As part of this release we had 87 commits which resulted in 6 issues being closed.
Release 2.1.1

Enhancements

  • #1658 Purge doesn't remove cached documents

Bugs

  • #3692 Failure to write old revision can result in malformed revision body in revtree
  • #3724 Resync with xattrs causes warnings for every no-op
  • #3738 2.0 replication doesn't notify clients when unable to send rev message
  • #3756 DCP Feed does not seed from all nodes

Where to get it

You can download this release from Couchbase.com

2.1.0

15 Jun 11:26
a036bd8
Compare
Choose a tag to compare

As part of this release we had 178 commits which resulted in 27 issues being closed.

Performance Improvements

  • #716 Use sync.atomic to synchronize logging logLevel
  • #2396 SyncGateway restart after node automatic failover is taking more time
  • #2536 SG-Replicator throughput is not increasing with SG-Accelerator
  • #2563 Allow callers to provide current value to WriteUpdateWithXattr

Enhancements

  • #145 Switch from base/logging.go to 'clog' package
  • #341 Sync_Gateway config file only supports one URL in connection string
  • #716 Use sync.atomic to synchronize logging logLevel
  • #939 Use W3C log format for HTTP logging
  • #1021 Enable log level to be set via SG config
  • #1652 Differentiate logging between standard out and standard error
  • #1964 Add DCP support to Walrus w/ rollback ability
  • #3119 Avoid design doc/view creation when already present
  • #3526 2.1.0- sg collect info - Show message if sync gateway is not running
  • #3584 Sync-gateway does not show any error on logs when used wrong name/value pairs for logging

Bugs

  • #1574 Windows installer does not start and stop service wrapper
  • #2173 Go-couchbase 500 errors when rebalancing
  • #3548 Windows logs are written to "Program Files (x86)" when running from "Program Files"
  • #3549 Incompatible Windows filename from _sgcollect_info endpoint
  • #3555 _sgcollect_info endpoint fails with 500 error on build 78
  • #3559 Output_directory parameter is ignored on sg_collectinfo rest end point
  • #3561 Uploadhost is ignored when upload parameter is not given to _sgcollect_info end point
  • #3572 _sg_collect_info rest end point : Throwing bad request error for a requirement for upload host with upload enabled to false
  • #3583 Sgcollect : No sgcollect info zip for sg accel
  • #3632 Sgcollect rest api fails with no write access to "/opt/couchbase-sync-gateway/tools"
  • #3655 Sg collect rest API does not create zip files under /home/sync-gateway

Known Issues

  • #3562 Sync Gateway requires Couchbase Server nodes to use the same SSL memcached port

Where to get it

You can download this release from Couchbase.com