Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 10, 2012
  1. @Damienkatz

    MB-5611: Reduce replication http retries from 10 to 2

    Damienkatz authored Peter Wansch committed
    Because XDCR now has better high level error handling and retry logic
    via supervisors, reduce the http retries to 2, so that during
    rebalance or other transient conditions that can cause errors, other
    replicators may continue.
    
    Change-Id: Icbda799cc87be7cbe155c6d344666700d4c9d391
    Reviewed-on: http://review.couchbase.org/20665
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
Commits on Aug 23, 2012
  1. @alk

    MB-100: got rid of max_dbs_open

    alk authored alk committed
    Because we don't need it at all.
    
    Change-Id: I3f384d284e619476a58df41e3ead31c43026bad0
    Reviewed-on: http://review.couchbase.org/19737
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Aug 8, 2012
  1. @aartamonau @fdmanana

    CBD-423 Kill couch_set_view_update daemon.

    aartamonau authored fdmanana committed
    The idea is to resurrect it in ns_server so that we could depend on
    some concepts that are unknown to couchdb (like development views
    etc.).
    
    Change-Id: I6ed51434566abd92a8068cda75e8fbaf410ac50a
    Reviewed-on: http://review.couchbase.org/19268
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Jul 11, 2012
  1. @jchris

    turn on changes for use in testing / debugging

    jchris authored
    Change-Id: Iaca8388dff0044531737b03f06a7dbe054920e81
    Reviewed-on: http://review.couchbase.org/17751
    Reviewed-by: Chris Anderson <jchris@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Chris Anderson <jchris@couchbase.com>
Commits on Jul 6, 2012
  1. @apage43 @fdmanana

    Disable compactor consistency check by default

    apage43 authored fdmanana committed
    Change-Id: Ifb450c79bdb6afd7851bb967db60b087a9e592a5
    Reviewed-on: http://review.couchbase.org/17982
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Jul 2, 2012
  1. @fdmanana

    CBD-69 Periodically update set view indexes

    fdmanana authored fdmanana committed
    There's now an internal daemon that periodically (default period
    is 5 seconds) triggers an update on all indexes if there are at
    least N new changes to index (default N = 5000).
    A periodicity of 0, or a minimum number of change of 0, disables
    the automatic index updates, ensuring exactly the same behaviour
    as before this change.
    
    Change-Id: I15b49b6b27063319651908b12d6533797049198e
    Reviewed-on: http://review.couchbase.org/17702
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Jun 6, 2012
  1. @fdmanana

    CBD-333 Make mapreduce timeout configurable via couch_config

    fdmanana authored fdmanana committed
    Change-Id: I8d2b1be261162b7bc4c9ba4803bf04737a6188d0
    Reviewed-on: http://review.couchbase.org/16809
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Commits on Jun 5, 2012
  1. @jchris

    Remove non-supported ReST API endpoints

    jchris authored
    These changes lower the surface area of the REST API.
    This does not yet add access control for SASL buckets,
    nor does it distinguish between requests triggered by
    the UI from those coming from an external client.
    
    There's got to be an easier way to retrigger buildbot.
    
    Change-Id: I9c64a64f6956bb2717997a58feb0d571087fa0a0
    Reviewed-on: http://review.couchbase.org/16660
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Jun 4, 2012
  1. @apage43

    CBD-45 Use couchstore compactor

    apage43 authored
    Change-Id: Id66cccb3873bb40d2d594f5148f19244e07b5b3d
    Reviewed-on: http://review.couchbase.org/15585
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on May 30, 2012
  1. @fdmanana

    CBD-294 Simplify/cleanup httpd layer for performance

    fdmanana authored fdmanana committed
    Removed all the features not used in Couchbase Server
    (vhosts, url rewriting, access log, etc).
    These were increasing, very significantly, query response
    times/latencies.
    
    Tests repeated on Linux and Mac OS X, 2 and 4 nodes clusters,
    with evperf and the erlang script view_query_perf.
    
    Some sample results with view_query_perf below.
    
    $ ./run --queries 25000 --workers 1 --query-url 'http://localhost:9500/default/_design/test2/_view/view1?limit=10' --output-times before
    Spawning 1 workers, each will perform 25000 view queries
    View query URL is:  http://localhost:9500/default/_design/test2/_view/view1?limit=10
    
    Waiting for workers to finish...
    
    All workers finished. Final statistics are:
    
        Average response time:   6.4329149200000275ms
        Highest response time:   168.963ms
        Lowest response time:    5.382ms
        Response time std dev:   1.4596464282289152ms
        # of errors:             0
    
    Saving query response times to file before
    
    $ ./run --queries 25000 --workers 1 --query-url 'http://localhost:9500/default/_design/test2/_view/view1?limit=10' --output-times after
    Spawning 1 workers, each will perform 25000 view queries
    View query URL is:  http://localhost:9500/default/_design/test2/_view/view1?limit=10
    
    Waiting for workers to finish...
    
    All workers finished. Final statistics are:
    
        Average response time:   5.704996960000008ms
        Highest response time:   161.67ms
        Lowest response time:    4.836ms
        Response time std dev:   1.463934100590158ms
        # of errors:             0
    
    Saving query response times to file after
    
    $ cat before | perl -MStatistics::Histogram -e '@data = <>; chomp @data; print get_histogram(\@data);'
    Count: 25000
    Range:  5.382 - 168.963; Mean:  6.433; Median:  6.310; Stddev:  1.460
    Percentiles:  90th:  6.987; 95th:  7.342; 99th:  8.240
       5.382 -    7.861: 24472 #####################################################
       7.861 -   11.304:   486 #
      11.304 -   16.083:    28 |
      16.083 -   22.720:     3 |
      22.720 -   31.935:     7 |
      31.935 -   44.729:     1 |
      44.729 -   87.161:     1 |
      87.161 -  121.409:     1 |
     121.409 -  168.963:     1 |
    
    $ cat after | perl -MStatistics::Histogram -e '@data = <>; chomp @data; print get_histogram(\@data);'
    Count: 25000
    Range:  4.836 - 161.670; Mean:  5.705; Median:  5.602; Stddev:  1.464
    Percentiles:  90th:  6.191; 95th:  6.499; 99th:  7.333
       4.836 -    7.140: 24633 #####################################################
       7.140 -   10.354:   336 #
      10.354 -   14.837:    24 |
      14.837 -   29.811:     3 |
      29.811 -   41.976:     1 |
      41.976 -   58.945:     1 |
      58.945 -  161.670:     2 |
    
    Change-Id: I7c029c334df5b2322837e1b213efabe4818b0361
    Reviewed-on: http://review.couchbase.org/16460
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on May 22, 2012
  1. @fdmanana

    CBD-165 Add design doc cache for set views

    fdmanana authored fdmanana committed
    For every query and index access we used to always read
    the corresponding design document from disk.
    
    Design documents live in a dedicated database (master database)
    which is normally small (1 or 2 btree nodes in the id and seq
    btrees), so in the best (and most common scenario) we do 2 disk
    reads (a single btree node can have easily 10 to 20 design docs,
    plus 1 design doc body read), decompress the design doc body read
    from disk and then JSON decode that body.
    
    When the system is under high activity, this operation can easily
    take between 0.5ms to 10ms (high concurrency, Erlang IO subsystem
    very busy), as observed both on Linux and Mac OS X, with hard disks
    and SSDs.
    
    This design document cache avoids the disk reads and decompression
    and JSOn decoding of the design document bodies.
    
    Change-Id: I5e7a647aa2d73a15e0c3d3f9a132a6f449763114
    Reviewed-on: http://review.couchbase.org/16184
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: buildbot <build@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Apr 6, 2012
  1. @fdmanana @Damienkatz

    View merger now uses lhttpc instead of ibrowse

    fdmanana authored Damienkatz committed
    Change-Id: I4bb37c520e2396b015901180a7ef15e3d937ff7c
    Reviewed-on: http://review.couchbase.org/14591
    Tested-by: buildbot <build@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Damien Katz <damien@couchbase.com>
Commits on Mar 1, 2012
  1. @fdmanana

    Separate barriers for main and active index updates

    fdmanana authored fdmanana committed
    Replica index updates can prevent main index updates from
    running sooner, causing clients to wait for a very long
    time to get responses to view queries. Therefore use a
    separate, and smaller, pool for replica index updaters.
    
    This relates to MB-4848.
    
    Change-Id: If356994fc35ac24e5b09199b18304244ca7af777
    Reviewed-on: http://review.couchbase.org/13704
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 2, 2012
  1. @apage43

    Make BTree NIF disablable via config

    apage43 authored
    Change-Id: I91dec158ee3e1e1183b8aebfd7fc317266b16862
    Reviewed-on: http://review.couchbase.org/12929
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: buildbot <qe@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
Commits on Nov 22, 2011
  1. @fdmanana @alk

    Move set views feature into a separate application

    fdmanana authored alk committed
    This is purely to make the code more organized and allow
    to have more organized Erlang ETAP tests (coming soon).
    It's also a preparation to abstract this feature to make
    it more reusable and extendable.
    
    Change-Id: Id1d5c0b0e2c401d41768e64b98898112a69065c8
    Reviewed-on: http://review.couchbase.org/11008
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
Commits on Oct 30, 2011
  1. @fdmanana

    Make attachment stream buffer size configurable

    fdmanana authored fdmanana committed
    Instead of being hardcoded to 4Kb, it is now configurable.
    A quick test using couch_doc:att_foldl/3 against a 128Kb
    attachment written using a buffer of 4Kb and 32Kb:
    
    Buffer size of 4Kb:
    
    4> Att = hd(Doc#doc.atts).
         type = <<"application/x-www-form-urlencoded">>,
         att_len = 131072,disk_len = 131072,
         md5 = <<76,223,24,223,251,252,182,43,98,104,11,89,222,122,
                 185,12>>,
         revpos = 1,
         data = {<0.159.0>,
                 [{79,8192},
                  {8277,8192},
                  {16475,8192},
                  {24673,8192},
                  {32871,8192},
                  {41069,8192},
                  {49267,8192},
                  {57465,8192},
                  {65663,8192},
                  {73861,8192},
                  {82059,8192},
                  {90257,8192},
                  {98455,8192},
                  {106653,8192},
                  {114851,8192},
                  {123049,8192}]},
         encoding = identity}
    5> element(1, timer:tc(couch_doc, att_foldl, [Att, fun(B, A) -> [B | A] end, []])).
    1353
    
    Buffer size of of 32Kb:
    
    4> Att = hd(Doc#doc.atts).
         type = <<"application/x-www-form-urlencoded">>,
         att_len = 131072,disk_len = 131072,
         md5 = <<76,223,24,223,251,252,182,43,98,104,11,89,222,122,
                 185,12>>,
         revpos = 1,
         data = {<0.157.0>,
                 [{79,40960},{41053,40960},{82027,40960},{123001,8192}]},
         encoding = identity}
    5> element(1, timer:tc(couch_doc, att_foldl, [Att, fun(B, A) -> [B | A] end, []])).
    782
    
    Closes COUCHDB-1009.
    
    Change-Id: I064a942108389a79c85ce2a0fdb87a4ce24546c5
    Reviewed-on: http://review.couchbase.org/10456
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Oct 27, 2011
  1. @farshidce

    commenting out "vendor" specific info

    farshidce authored
    vendor specific information is moved to voltron build and couchdbx-app
    which are responsible for packaging and adding the right
    license information in the build time
    
    Change-Id: Ifa4eca972e07ecf6b2200866d02d4a45b50bfdb3
    Reviewed-on: http://review.couchbase.org/10430
    Reviewed-by: Benjamin Young <benjamin@couchbase.com>
    Reviewed-by: Farshid Ghods <farshid.ghods@gmail.com>
    Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
  2. bump vendor version to 2.0.0

    Jan Lehnardt authored
    Change-Id: I37162d991653aad673237c3ffc2cfd833353a593
    Reviewed-on: http://review.couchbase.org/10427
    Reviewed-by: Farshid Ghods <farshid.ghods@gmail.com>
    Reviewed-by: Jan Lehnardt <jan@couchbase.com>
    Tested-by: Jan Lehnardt <jan@couchbase.com>
Commits on Oct 26, 2011
  1. @BigBlueHat

    using new vendor object from Welcome JSON to modify Futon

    BigBlueHat authored BigBlueHat committed
    Change-Id: I0e8a574d347a94a6cfe3c3b38ce3c3736704c713
    Reviewed-on: http://review.couchbase.org/9638
    Tested-by: Dustin Sallings <dustin@spy.net>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Reviewed-on: http://review.couchbase.org/10278
    Reviewed-by: Benjamin Young <benjamin@couchbase.com>
    Tested-by: Benjamin Young <benjamin@couchbase.com>
Commits on Oct 25, 2011
  1. @fdmanana

    Remove view_compaction section in .ini config

    fdmanana authored fdmanana committed
    This is no longer used anywhere after the view compaction
    method was updated to do btree copies instead of inserting
    into new btrees.
    
    Change-Id: I0b34133afb4853445e3941d19834fb3c38aa7230
    Reviewed-on: http://review.couchbase.org/10305
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Oct 22, 2011
  1. @tilgovi

    vendor info in welcome message (COUCHDB-1285)

    tilgovi authored Jan Lehnardt committed
    Change-Id: I6fdc04e39a87ecadd5d8b983495361d7f772878f
    Reviewed-on: http://review.couchbase.org/10280
    Reviewed-by: Jan Lehnardt <jan@couchbase.com>
    Tested-by: Jan Lehnardt <jan@couchbase.com>
Commits on Oct 6, 2011
  1. @fdmanana

    Add "set view" modules

    fdmanana authored fdmanana committed
    These are the base for adding the superstart btree indexer and
    querying capabilities.
    
    Change-Id: Ie0b3cc5aa7012efaa3e61456bff84479822d3519
    Reviewed-on: http://review.couchbase.org/9368
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Oct 4, 2011
  1. @fdmanana

    Replicator: configurable # of retries per request

    fdmanana authored fdmanana committed
    Instead of using an hardcoded value of 10, this parameter is
    now configurable via .ini configuration or per replication
    in the replication document/object (field "retries_per_request").
    
    Change-Id: Ic19aa47a72cc49f72f85d51db4e34893e77e6f3b
    Reviewed-on: http://review.couchbase.org/9872
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Chris Anderson <jchris@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Aug 21, 2011
  1. @fdmanana

    Update compaction daemon's config format

    fdmanana authored fdmanana committed
    The .ini configuration values are now an Erlang term -
    a list of 2 elements tuples, instead of K=V pairs separated
    by spaces. This is to make it consistent with the rest of
    the .ini configuration.
    
    Change-Id: I49f77e929784ff1b397e11a8cd918d0947b548c2
    Reviewed-on: http://review.couchbase.org/9059
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Aug 18, 2011
  1. @janl @fdmanana

    Add couch_access_log module, a common log format logger.

    janl authored fdmanana committed
    This module introduces a new log file couch_access.log in the
    spirit of Apache httpd's access.log.
    
    The log format is specified here:
    
      http://en.wikipedia.org/wiki/Common_Log_Format
    
    There is currently no way to configure a different log format, but
    that can be added easily later.
    
    This is a new module rather than an extension to the couch_log
    module to allow easy addition to Apache CouchDB. Ideally, this
    will be a plugin in the future.
    
    A note for chunked responses, the response body length reported is
    "chunked" rather than the number of bytes. The case is unspecified
    in the format description. Maybe the fix is keeping track of bytes
    sent in a chunked response, but I didn't want to make the first stab
    at this more complicated that it has to be. I'm happy to adjust.
    
    Change-Id: Ie314a861557dfa3eceedd3eb43d8753c6710e5db
    Reviewed-on: http://review.couchbase.org/9063
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Aug 15, 2011
  1. @fdmanana

    Update compaction daemon's config

    fdmanana authored fdmanana committed
    The specification of compactions is now under the section
    [compactions] while the section [compaction_daemon] is now
    used for global parameters used by the compaction daemon.
    Also trimmed configuration comment lines to a 80 characters
    max width.
    
    Change-Id: I6b417b64d30de6f08992aa040c717978a46ad860
    Reviewed-on: http://review.couchbase.org/8571
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Aug 10, 2011
  1. @fdmanana

    Add couch_indexer_manager

    fdmanana authored fdmanana committed
    This process makes sure that at any given point in time, only
    N view indexers are running, blocking all other view indexers
    until a slot is free.
    
    Change-Id: Ie41aa1acb450fa0443d1188a25999657a3ebbe14
    Reviewed-on: http://review.couchbase.org/8768
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Jul 28, 2011
  1. @fdmanana

    Updated defaults

    fdmanana authored fdmanana committed
    os_process_limit and os_process_timeout were increased
    
    Change-Id: I78577afd374dfbddca139fc398ec3b37a4dd87a6
    Reviewed-on: http://review.couchbase.org/8511
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Jul 22, 2011
  1. @fdmanana

    Allow parallel compaction of a database and its views

    fdmanana authored fdmanana committed
    This allows, via a configuration parameter, for a database and
    its view groups to be compacted in parallel. This is useful
    when the database and view index files are stored on different
    disks for example.
    
    Change-Id: Ifb2ab78bcd5666e1d95397b3c47016e6de941a6c
    Reviewed-on: http://review.couchbase.org/8082
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Jul 10, 2011
  1. @fdmanana @alk

    Add view merging feature

    fdmanana authored alk committed
    This feature allows for merging view streams from several
    local and remote databases.
    
    For map views, the source databases do not need to have
    the same map function code, that is, we can merge arbitry
    map-only views.
    
    For reduce views however, all the source databases must have
    exactly the same reduce function code.
    This is a necessary restriction due to the rereduce
    operations that might be needed during the merge phase.
    However, it a "rereduce" parameter is supplied, which is
    a string encoding a rereduce function, it's possible to
    combine/merge arbitrary reduce views. Bear in mind however
    that combining values originated by different reduce functions
    can yield unexpected results sometimes. The optional parameter
    "language" can also be supplied, which tells the server in
    which language the rereduce function is written (defaults to
    "javascript" if ommitted).
    
    This feature is exposed via the URI /_view_merge/ and accepts
    all the query parameters that regular view URIs accept
    (except for ?update_seq=true, which is not yet implemented).
    
    E.g.
    
    $ curl -H 'Content-Type: application/json' -X POST \
            http://localhost:5984/_view_merge \
            -d '{"views": { \
                  "test_db_1": "test/mapview",
                  "http://myserver:5984/test_db_2": "test2/mapview2",
                  "test_db_3": "test3/mapview3"
                }}'
    
    {"total_rows":20,"rows":[
        {"id":"1","key":1,"value":"1"},
        {"id":"2","key":2,"value":"2"},
        {"id":"3","key":3,"value":"3"},
        {"id":"4","key":4,"value":"4"},
        {"id":"5","key":5,"value":"5"},
        {"id":"6","key":6,"value":"6"},
        {"id":"7","key":7,"value":"7"},
        {"id":"8","key":8,"value":"8"},
        {"id":"9","key":9,"value":"9"},
        {"id":"10","key":10,"value":"10"},
        {"id":"11","key":11,"value":"11"},
        {"id":"12","key":12,"value":"12"},
        {"id":"13","key":13,"value":"13"},
        {"id":"14","key":14,"value":"14"},
        {"id":"15","key":15,"value":"15"},
        {"id":"16","key":16,"value":"16"},
        {"id":"17","key":17,"value":"17"},
        {"id":"18","key":18,"value":"18"},
        {"id":"19","key":19,"value":"19"},
        {"id":"20","key":20,"value":"20"}
    ]}
    
    The HTTP GET verb is also supported (query with ?views=encoded_json_object).
    
    The view merging spec object can also describe a chained view merging
    strategy, allowing for a multi level tree structured view merging.
    This specification is done by nesting view spec objects inside view spec
    objects. Example:
    
    {
        "views": {
             "test_db_a": "test/redview1",
             "http://serverB:5984/_view_merge": {
                  "views": {
                       "test_db_b": "test/redview2",
                       "http://foobar:5985/test_db_c": "test/redview3"
                  }
             }
        }
    }
    
    There's also support for a policy about what to do when streaming
    from a remote server fails. This policy is specified the query
    parameter "on_error" which can have 2 possible values:
    "continue" or "stop".
    
    "continue" means that if streaming from a remote server fails (whether
    at the beginning or in the middle), we continue feeding the client with
    view results from the other souces and add a JSON view row which
    indicates there was an error streaming from that particular source,
    example:
    
    {"total_rows":50,"rows":[
    	{"id":"1","key":1,"value":"1"},
    	{"id":"2","key":2,"value":"2"},
    	{"id":"3","key":3,"value":"3"},
    	{"id":"4","key":4,"value":"4"},
    	{"error": true, "from": "http://myserver:5984/mydb",
    		"reason": "timeout"}
    	{"id":"6","key":6,"value":"6"},
    	(....)
    ]}
    
    The "stop" policy means that when we get an error while streaming from
    a remote server we stop the view merging process and the last row sent
    to the client is an error signaling row like the one given in the
    previous example.
    
    There's also a parameter "connection_timeout" (value in milliseconds)
    that can be specified per /_view_merge/ request. It defaults to 10s.
    
    Change-Id: I49c06fae8198a7e9d32bc4f62a0037866e8c17a2
    Reviewed-on: http://review.couchbase.org/7655
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Jul 8, 2011
  1. @fdmanana @dustin

    Simplify replication HTTP connection pool

    fdmanana authored dustin committed
    Getting completely rid of HTTP pipelining support - ibrowse's
    implementation is really unreliable and makes the code more
    complex.
    When all the connections are in use, the clients no longer
    busy wait for them, instead they're blocked by the pool
    and get unblocked as soon as a connection is available.
    
    Change-Id: Ifb6d983e27cd22ff97886465205b63749602d5f4
    Reviewed-on: http://review.couchbase.org/7693
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Dustin Sallings <dustin@spy.net>
Commits on Jul 3, 2011
  1. @alk @dustin

    introduced configurable couch database frontend

    alk authored dustin committed
    All http requests (except _design/** and _all_docs) are performed
    through configurable db-frontend module. Default implementation
    performs operations normally though couchdb internals. But by choosing
    other db-frontend module it's possible to intercept database
    operations.
    
    _design/** and _all_docs are already intercept-able via normal couch
    configuration.
    
    Change-Id: I5661c25cd959cef9d6e27fbb0befffe6bab51b04
    Reviewed-on: http://review.couchbase.org/7600
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Jun 26, 2011
  1. @fdmanana @dustin

    Update some replicator defaults

    fdmanana authored dustin committed
    Use smaller worker batch size so that overall progress
    is more steady. Also decrease connection pipeline size because
    an error in one request will result in all other subsequent
    requests in the same connection to be retried, making overall
    progress slower - this is more visible when doing multiple
    pull replications from the same server.
    
    Change-Id: Ie0acc54b3e6ff65d1df8907b34f68cc962666267
    Reviewed-on: http://review.couchbase.org/7585
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Tested-by: Dustin Sallings <dustin@spy.net>
Commits on May 28, 2011
  1. @janl @dustin

    Add CoffeeScript (http://coffeescript.org/) support to the JS view se…

    janl authored dustin committed
    …rver.
    
    This allows you to write all query server functions in CoffeeScript.
    
    The implementation re-uses the JS query server and adds an additional,
    optional compilation step. To make the implementation easier for now,
    a new main-coffee.js file is generated that includes the CoffeeScript
    compiler, but I think we can do away with that in a future optimisation
    and just use a single main.js that can handle both.
    
    The patch includes basic tests for the JS test suite that I tested
    in Firefox and Chrome. I'm no expert in CoffeeScript, so I don't
    know if more complex script will break the implementation. `make
    distcheck` passes.
    
    Futon picks up the "coffeescript" design document lanugage as expected
    and view definition interaction works as usual.
    
    The implementation does some sting maniulation on top of the
    CoffeeScript compile step that probably can be done more nicely.
    
    List functions don't deal well with the implicit return generated by
    CoffeeScript, but J Chris says, this will be easy to fix.
    
    The patch adds CoffeeScript 1.1.1 which is MIT licensed and updates
    the NOTICE, license.skip and .gitignore files as well as the build
    system accordingly.
    
    Change-Id: I85d992a6c8fdad33c7ea6f1e10eddae49b915fec
    Reviewed-on: http://review.couchbase.org/6640
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Tested-by: Dustin Sallings <dustin@spy.net>
Commits on May 20, 2011
  1. @fdmanana @dustin

    Replication manager: allow max_replication_retry_count to be set to "…

    fdmanana authored dustin committed
    …infinity"
    
    Change-Id: Ifc61cbabc48bd422ede221c8a58f057c9ceade66
    git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1125282 13f79535-47bb-0310-9956-ffa450edef68
    Reviewed-on: http://review.membase.org/6397
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Dustin Sallings <dustin@spy.net>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
Something went wrong with that request. Please try again.