Release notes

Release notes

Edit on GitHub

2.0.0

Upgrading

Starting in Sync Gateway 2.0, Sync Gateway’s design documents include the version number in the design document name. In this release for example, the design documents are named _design/sync_gateway_2.0 and _design/sync_housekeeping_2.0.

On startup, Sync Gateway will check for the existence of these design documents, and only attempt to create them if they do not already exist. Then, Sync Gateway will wait until views are available and indexed before starting to serve requests. To evaluate this, Sync Gateway will issue a stale=false&limit=1 query against the Sync Gateway views (channels, access and role_access).

If the view request exceeds the default timeout of 75s (which would be expected when indexing large buckets), Sync Gateway will log additional messages and retry. The logging output will look like this:

14:26:41.039-08:00 Design docs for current SG view version (2.0) found.
14:26:41.039-08:00 Verifying view availability for bucket default...
14:26:42.045-08:00 Timeout waiting for view "access" to be ready for bucket "default" - retrying...
14:26:42.045-08:00 Timeout waiting for view "channels" to be ready for bucket "default" - retrying...
14:26:42.045-08:00 Timeout waiting for view "role_access" to be ready for bucket "default" - retrying...
14:26:44.065-08:00 Timeout waiting for view "access" to be ready for bucket "default" - retrying...
14:26:44.065-08:00 Timeout waiting for view "role_access" to be ready for bucket "default" - retrying...
14:26:44.065-08:00 Timeout waiting for view "channels" to be ready for bucket "default" - retrying...
14:26:44.072-08:00 Views ready for bucket default.

Sync Gateway 2.0 will not automatically remove the previous design documents. Removal of the obsolete design documents is done via a call to the new /{db}/_post_upgrade endpoint in Sync Gateway’s Admin REST API. This endpoint can be run in preview mode (?preview=true) to see which design documents would be removed. To summarize, the steps to perform an upgrade to Sync Gateway 2.0 are:

  1. Upgrade one node in the cluster to 2.0, and wait for it to be reachable via the REST API (for example at http://localhost:4985/).
  2. Upgrade the rest of the nodes in the cluster.
  3. Clean up obsolete views:
    • Optional Issue a call to /_post_upgrade?preview=true on any node to preview which design documents will be removed. To upgrade to 2.0, expect to see "syncgateway" and "synchousekeeping" listed.
    • Issue a call to /post_upgrade to remove the obsolete design documents. The response should indicate that "syncgateway" and "synchousekeeping" were removed.

Performance Improvements

  • #1383 Nginx load balancer needs plugins to detect db offline state.
  • #1850 Avoid duplicate parsing of HTTP query string
  • #2410 SG gets into a 100% cpu state, where restart is the only recovery
  • #2871 Review bucket_gocb concurrent op limits
  • #2928 Optimize document unmarshalling for GetDoc

Enhancements

  • #744 When try to put nonexistent document with rev: Document revision conflict
  • #955 Support group reduce queries
  • #1280 Auto-expire unused _local checkpoint documents
  • #1580 Use latest version of Otto
  • #1720 Replication inaccurate 403 forbidden
  • #1850 Avoid duplicate parsing of HTTP query string
  • #2354 Windows service wrapper should write to a configurable stderr log file
  • #2709 Conflict-free mode (allow_conflicts:false)
  • #3123 Log _sync:seq on startup
  • #3136 Inter-document compression in BLIP replicator
  • #3168 Move allow_conflicts out of unsupported config

Bugs

  • #1003 SG with bucket shadowing doesn't work properly after CB restarted
  • #1047 Runtime panic while running tests on Jenkins
  • #1406 Feedtype=DCP not working sometimes
  • #1488 Rebalance -in a CBS node results in timeouts which manifests as empty changes feed
  • #1720 Replication inaccurate 403 forbidden
  • #2108 Missing sequences in _changes feed causing sg-replicate missing documents replication
  • #2223 Wrong name being set for users
  • #2371 Logging - "Replicate" works when in *.json but not when you PUT _logging
  • #2383 Channel cache missing data when request instantiating cache times out
  • #2410 SG gets into a 100% cpu state, where restart is the only recovery
  • #2441 RedHat/Centos 6 'initctl restart sync_gateway' does not work as expected
  • #2458 Log rotation skipping BLIP keys
  • #2489 XATTRs - Error unmarshalling doc
  • #2497 XATTRS: Getting doc after restart fails
  • #2505 XATTRs: View not returning results after restart
  • #2521 XATTRs: GET on doc after deletion returns inconsistent responses
  • #2717 SG Blip handler not reloading user channels
  • #3048 Panic when attempting to make invalid update to a conflicting document
  • #3049 Allow non-winning tombstone revisions when running with allow_conflicts=false