Permalink
Switch branches/tags
Commits on May 16, 2016
  1. Send minimal lists of revisions from doc GET, _bulk_get, _revs_diff

    The REST API currently includes the revision's entire history in the
    _revisions property of a document and the possible_ancestors property of
    a _revs_diff response. This is vastly more than the client needs.
    Sending a minimal number of revisions will decrease the bandwidth used
    by replication, and save CPU cycles on both server and client.
    
    Docs:
    https://github.com/couchbase/sync_gateway/wiki/Sending-Minimal-Histories
    
    Fixes #1752
    snej committed May 10, 2016
Commits on Feb 27, 2016
  1. Enable HTTP/2 support

    Also added "HTTP/2" suffix to HTTP logs, to identify which client
    requests are coming over HTTP/2 connections.
    
    (Requires Go 1.6, of course.)
    
    Fixes #1626
    snej committed Feb 27, 2016
Commits on Nov 13, 2015
  1. Merge pull request #1282 from couchbase/fix/server_header

    Improved "Server:" response header
    snej committed Nov 13, 2015
Commits on Nov 10, 2015
  1. Updated "Server:" response header

    Header value for unofficial builds should still include a parseable
    version number, else CBL gets confused.
    
    Added Git branch name and commit SHA to header value for unofficial
    builds.
    
    New header looks like:
    Couchbase Sync Gateway/1.2 branch/fix/server_header commit/5bfcf79
    
    Fixes #1209
    snej committed Nov 10, 2015
  2. Cleanup of Makefile and .gitignore

    * Removed references to obsolete vendor/pkg directory
    * "make" should run build.sh
    snej committed Nov 10, 2015
Commits on Oct 1, 2015
  1. GZip compression for WebSocket-based changes feeds

    If the client request JSON message contains "Accept-Encoding":"gzip",
    the WebSocket change messages sent by the server may be GZip-compressed.
    Compressed messages are WebSocket binary messages, instead of the text
    messages that contain JSON. There is one GZip context for the duration
    of the WebSocket, and each message is compressed using that context.
    
    I'm seeing messages compressed down to about 30-40% original size.
    
    Fixes #1179
    snej committed Oct 1, 2015
Commits on Aug 12, 2015
  1. Support ?content_encoding=false on attachment requests, for CBL/iOS

    Need a way to disable the `Content-Encoding: gzip` response header, to
    work around an issue with the Cocoa frameworks for CBL/iOS.
    Fixes #1057
    snej committed Aug 12, 2015
Commits on Aug 10, 2015
  1. Added support for partial GETs of attachments (Range: header)

    The HTTP handler for attachments (/db/doc/attachmentname) now supports
    GETs of byte ranges using the standard "Range:" header. This will allow
    clients to resume interrupted attachment downloads, or do random-access
    streaming of attachments.
    Fixes #1046
    snej committed Aug 10, 2015
Commits on May 1, 2015
  1. Fixes for edge cases in new rev-pruning algorithm

    * If all leaf revisions are deletions (i.e. doc is deleted), every single
      rev would be pruned away. Oops. Instead, use the deepest revision as
      the start to count back from to find the earliest gen to keep.
    * Under no circumstances delete the doc's current revision!
    
    Fixes #807 (I think; Traun is going to test)
    snej committed with tleyden May 1, 2015
  2. Fixes for edge cases in new rev-pruning algorithm

    * If all leaf revisions are deletions (i.e. doc is deleted), every single
      rev would be pruned away. Oops. Instead, use the deepest revision as
      the start to count back from to find the earliest gen to keep.
    * Under no circumstances delete the doc's current revision!
    
    Fixes #807 (I think; Traun is going to test)
    snej committed May 1, 2015
Commits on Apr 22, 2015
  1. Store rev bodies in JSON-marshaled RevTree more efficiently

    The JSON form of a RevTree (as stored in the bucket) stores revision
    bodies inefficiently. It's an array of strings indexed parallel to the
    "revs" array. Since almost all revs have no body stored (only conflicts
    do) it ends up being a long array of empty strings.
    
    This patch changes the format. There's no more "bodies" array. Instead
    there's a "bodymap", a JSON dictionary whose keys are indexes into
    "revs" and values are revision bodies. Typically this property will be
    missing entirely or have only one item in it.
    snej committed Apr 22, 2015
  2. Made revision pruning algorithm more effective

    With the old algorithm, the rev-tree nodes of a merged conflict would
    never get pruned, nor would the /maxRevTreeDepth/ ancestors below them.
    This led to some huge revision trees.
    The new algorithm simply finds the min generation # of all non-deleted
    leaf nodes (i.e. current node + conflicts) and prunes all nodes whose
    generation number is /maxRevTreeDepth/ less than that.
    Fixes #501
    snej committed Apr 22, 2015
Commits on Mar 12, 2015
  1. Merge branch 'master' into feature/query_api

    Conflicts:
    	src/github.com/couchbase/sync_gateway/db/design_doc.go
    	src/github.com/couchbase/sync_gateway/rest/view_api.go
    	src/github.com/couchbaselabs/go.assert
    	src/github.com/gorilla/context
    	src/github.com/gorilla/mux
    	src/github.com/robertkrimen/otto
    	src/github.com/samuel/go-metrics
    	src/github.com/tleyden/fakehttp
    snej committed Mar 12, 2015
Commits on Feb 27, 2015
  1. Use Go's sync.Pool to maintain cache of gzip.Writers

    This is conceptually similar to the existing approach that uses a
    channel as a cache; but the sync.Pool class is tied into the Go runtime
    and GC, so it should be able to make better decisions about memory
    management.
    
    I made the gzip.Writer cache available via functions so that other code
    in SG that uses gzip can take advantage of it. (Right now that code is
    down in db/attachment.go, but in my delta branch it's moving into the
    rest package.)
    
    Also updated version requirement in go.sh, because sync.Pool is a Go 1.3
    feature.
    snej committed with tleyden Feb 26, 2015
Commits on Feb 26, 2015
  1. Merge pull request #680 from couchbase/feature/issue_666

    Config to allow empty passwords
    snej committed Feb 26, 2015
Commits on Jan 12, 2015
  1. Merge pull request #516 from couchbase/feature/issue_482_rebased

    Add webhook support
    snej committed Jan 12, 2015
Commits on Jan 7, 2015
  1. Added admin handler /db/_flush to delete and recreate the bucket

    Currently only works with Walrus, not Couchbase Server.
    For #558
    snej committed Jan 6, 2015
Commits on Jan 6, 2015
  1. Updated to new location of Go crypto, net, text packages

    They used to be at code.google.com/p/
    Now they're at golang.org/x
    A side benefits that they're now hosted using Git instead of SVN,
    so we can refer to them as submodules instead of having to copy the
    source code.
    snej committed Jan 6, 2015
Commits on Dec 5, 2014
Commits on Nov 18, 2014
  1. Log HTTP responses to requests that don't match any configured route

    Bad requests like "POST /_revs_diff" weren't logging any errors, because
    they get handled specially and that special code wasn't calling the
    handler's logDuration method, which is what logs the response.
    snej committed Nov 18, 2014
  2. Merge pull request #470 from couchbase/feature/issue_434

    Add doc id to oldDoc for ease-of-use in sync function
    snej committed Nov 18, 2014
Commits on Nov 12, 2014
  1. Allow doc update if attachment's source revision has been compacted away

    If a revision is a stub with a revpos, but the parent revision body
    isn't available anymore, allow it.
    Fixes #498
    snej committed Nov 12, 2014
  2. Added submodule github.com/natefinch/npipe

    New transitive Windows-only dependency.
    Fixes #499
    snej committed Nov 12, 2014
Commits on Oct 24, 2014
  1. Updated go-couchbase, gomemcached to latest

    * Merged sync_gateway branch of go-couchbase with current master branch
      (fixes #467)
    * Switched from dustin/gomemcached to couchbaselabs/gomemcached which
      has newer commits (Fixes #468)
    snej committed Oct 24, 2014
Commits on Oct 22, 2014
  1. Merge pull request #464 from couchbase/feature/issue_423

    Ensures that during _bulk_docs, if channel access or roles have been changed
    snej committed Oct 22, 2014
  2. Merge branch 'feature/issue_447'

    snej committed Oct 22, 2014
  3. Merge branch 'master' into feature/issue_447

    Conflicts:
    	src/github.com/couchbaselabs/sync_gateway/rest/api_test.go
    snej committed Oct 22, 2014
  4. Merge pull request #462 from couchbase/feature/issue_76

    Improved session management (delete, get) via Admin API
    
    Fixes #76
    snej committed Oct 22, 2014
  5. Merge pull request #461 from couchbase/feature/issue_298

    _all_docs supports limit, start key and end key options
    snej committed Oct 22, 2014
Commits on Oct 16, 2014
  1. Merge pull request #424 from couchbase/feature/issue_421

    When creating a user, rebuild the roles as well as the channels
    snej committed Oct 16, 2014
  2. Merge pull request #412 from couchbase/feature/issue_362

    Added config support for setting custom read/write timeouts on HTTP(S) server
    snej committed Oct 16, 2014
  3. Merge pull request #413 from couchbase/feature/issue_325

    Changed "Received out-of-order ..." log messages from being logged as Wa...
    snej committed Oct 16, 2014