Permalink
Commits on Jan 17, 2012
  1. @mschoch @farshidce

    bump to get syncpoint on github

    Change-Id: I595ebb12b37e5a767ddd701a3510b6dd87c1c29c
    Reviewed-on: http://review.couchbase.org/12440
    Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
    Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
    Reviewed-by: Farshid Ghods <farshid.ghods@gmail.com>
    mschoch committed with farshidce Jan 17, 2012
Commits on Dec 30, 2011
  1. @davisp @fdmanana

    Fix error stack traces

    If you get the stack in an exception handler after calling a function it
    gets changed from where the exception was thrown. Fixed simply by
    grabbing the stack before making logging calls.
    
    Change-Id: Ie1cb2fb557bd05d1c9a16a2cafaada38ffaaf1e0
    Reviewed-on: http://review.couchbase.org/11976
    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>
    davisp committed with fdmanana Nov 22, 2011
Commits on Dec 23, 2011
  1. @fdmanana @alk

    Fix btree copy case_clause error

    Closes MB-4560.
    
    Change-Id: Iabec1e870fbe74451ada31d7d94326170408a376
    Reviewed-on: http://review.couchbase.org/11767
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    fdmanana committed with alk Dec 20, 2011
  2. @fdmanana @aartamonau

    Update handling of set view group shutdown

    If a set database (partition) is deleted, shutdown the
    set view group only if that partition is marked as active
    or passive in the set view group's state.
    This prevents unnecessary shutdowns and index file deletes.
    
    Also fixed a badmatch when doing a lookup in the ets table
    couch_sig_to_setview_pid because the keys for this table have
    the shape {SetName, Sig} and not {DDocId, Sig}.
    
    Change-Id: Ie39f40816793ec65bf0aabff0569da6be240f889
    Reviewed-on: http://review.couchbase.org/11799
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    fdmanana committed with aartamonau Dec 21, 2011
Commits on Dec 22, 2011
  1. @fdmanana @bcui6611

    Temporarily disable collation driver

    Change-Id: Ibf0753f214c4d3f5299dbb8b18d46fc53c83120a
    Reviewed-on: http://review.couchbase.org/11829
    Reviewed-by: Bin Cui <bin.cui@gmail.com>
    Tested-by: Bin Cui <bin.cui@gmail.com>
    fdmanana committed with bcui6611 Dec 22, 2011
  2. @fdmanana @fdmanana

    Add test test/etap/074-doc-update-conflicts.t

    Test motivated by COUCHDB-911.
    
    Change-Id: I2ee2cb7cf4ca2a118107ebcef764e3d300503219
    Reviewed-on: http://review.couchbase.org/11006
    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>
    fdmanana committed with fdmanana Nov 18, 2011
Commits on Dec 20, 2011
  1. @aartamonau @alk

    Specify timeout to ibrowse:send_req_direct.

    ibrowse recognizes three kinds of timeouts: connect_timeout, timeout
    passed to ibrowse:send_req (and similar) call and
    inactivity_timeout. The first one is a tcp connection timeout. The
    second one is used as a timeout to gen_server:call and a timeout until
    ibrowse gets some data in response (though it ignores 1xx HTTP
    responses here). The third one defines for how long connection can be
    idle afterwards.
    
    Couch view merger sends any data in response only when merging of
    results is started. But before this it can trigger potentially long
    set view indexing process. Thus if the second timeout is small enough
    then the calling node basically will not wait for results from this
    node. We encountered it many times since this timeout has not been
    specified explicitly to ibrowse:send_req_direct call and the default
    value is 30 seconds.
    
    This change just passes conn_timeout from #index_merge record to
    send_req_direct. It should be emphasized though that this also changes
    gen_server:call timeout indirectly. It's not something we want to do
    but ibrowse API does not let us do it differently.
    
    Change-Id: I72241d96d9a3b5099f3d24fa6c30570808d55646
    Reviewed-on: http://review.couchbase.org/11722
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Dec 19, 2011
  2. @aartamonau @alk

    Throw an error when one tries to redefine a view group.

    Instead of just failing with function_clause error we now throw a
    meaningful error.
    
    Change-Id: I90d94609a63d01ca660e698b49eaa3d909c76462
    Reviewed-on: http://review.couchbase.org/11697
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Dec 16, 2011
Commits on Dec 9, 2011
  1. @bcui6611

    Revert "More efficient set view indexing"

    This reverts commit 3031d47.
    
    Conflicts:
    
    	src/couchdb/couch_os_process.erl
    
    Change-Id: Ifa6a3246daaa353e48c7d7c80b1f484644b8aaab
    Reviewed-on: http://review.couchbase.org/11573
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Bin Cui <bin.cui@gmail.com>
    bcui6611 committed Dec 9, 2011
Commits on Dec 8, 2011
  1. @alk

    Fix for MB-4511. Too many escapes for json validate.

    2nd try, was using YAJL API incorrectly.
    
    Change-Id: Id972138b0159686623f1589f6f69a0dd91429c2e
    Reviewed-on: http://review.couchbase.org/11552
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Aliaksey Kandratsenka committed with alk Dec 8, 2011
  2. @fdmanana @fdmanana

    Add set view header version

    This is to make index file upgrades easier in the future.
    
    Change-Id: I97dee1e392f06a360cf2cdf52342b68f6fc7ce00
    Reviewed-on: http://review.couchbase.org/11340
    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>
    fdmanana committed with fdmanana Nov 23, 2011
Commits on Dec 7, 2011
  1. @fdmanana

    Fix for MB-4511. Too many escapes for json validate.

    Change-Id: Ia5f2d855cada975f81dc8da8bb8fa7a3cb588422
    Reviewed-on: http://review.couchbase.org/11528
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Damien Katz committed with fdmanana Dec 7, 2011
Commits on Dec 5, 2011
  1. @fdmanana @alk

    Fix merging of set view queries with ?reduce=false

    Change-Id: I49b8994dc5e7e8af8e7f036ce8a03ae92fa1a123
    Reviewed-on: http://review.couchbase.org/11422
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    fdmanana committed with alk Dec 5, 2011
  2. @alk

    adapted dialyzer make target to separation of couch_set_view

    Change-Id: If01e047d80686d04f3c5c1b992962ec6d48711c3
    Reviewed-on: http://review.couchbase.org/11419
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Aliaksey Kandratsenka committed with alk Dec 5, 2011
Commits on Dec 4, 2011
  1. @vmx @alk

    Revert "Use erlang:'<'/2 directly for raw collation"

    This commit adds the old comparison function.
    It's based on the revert from
    http://review.couchbase.org/10505
    
    The revert got lost during the index merger refactoring.
    
    Change-Id: I36ad6496c033be881b7a7bbf7c6144b9e2a23f56
    Reviewed-on: http://review.couchbase.org/11305
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    vmx committed with alk Nov 30, 2011
Commits on Dec 1, 2011
  1. @fdmanana @alk

    Add src/couchdb/couch_db.hrl to list dependencies

    Whenever couch_db.hrl file is updated, the couch_set_view modules
    should be recompiled.
    
    Change-Id: Ieea94d265d705c367fde38bb052c8abf4c793ef8
    Reviewed-on: http://review.couchbase.org/11316
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    fdmanana committed with alk Dec 1, 2011
Commits on Nov 28, 2011
  1. @aartamonau

    Revert "Add garbage_collect call to prevent mem blowup in non-json mode"

    This reverts commit cafc75b.
    
    Change-Id: I5f25f47b04d35f66399724e6aaeb906216527e81
    Reviewed-on: http://review.couchbase.org/11194
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    aartamonau committed Nov 28, 2011
  2. @chiyoung

    MB-4427 Send commit errors only in the return_errors_only mode

    As a successful deletion operation returns doc_info, we should
    filter it out and only send commit errors to the client in the
    return_errors_only mode.
    
    Change-Id: I0dc73eeb3540ddac506351c58041569303d5191f
    Reviewed-on: http://review.couchbase.org/11175
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    chiyoung committed Nov 26, 2011
  3. @bcui6611

    MB-4470 Build ejson and snappy on windows

    Change-Id: I983f29aeee5fc4f312a3e68bd71a65deab015cf8
    Reviewed-on: http://review.couchbase.org/11160
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Bin Cui <bin.cui@gmail.com>
    bcui6611 committed Nov 24, 2011
Commits on Nov 23, 2011
  1. @fdmanana @fdmanana

    Add test src/couch_set_view/test/03-db-compaction-file-leaks.t

    This test verifies that if a set view group is open and its
    databases are compacted, the group doesn't crash and the group
    doesn't keep the pre-compaction database snapshots open forever
    (which would would cause database file handle leaks).
    
    Change-Id: I47c6027b9ff0e20928ec23e07b0fdaf3af225465
    Reviewed-on: http://review.couchbase.org/11085
    Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Nov 22, 2011
  2. @fdmanana @fdmanana

    Fixes to cleanup of old set view indexes

    Two fixes:
    
    1) If a ddoc is updated (or deleted), shutdown the old view
       groups as soon as all pending clients are served. This
       prevents old index file handle leaks when a view cleanup
       is requested (by shutting down the old groups, the
       corresponding index file ref counters are dropped);
    
    2) Allow index file cleanup when all design documents are deleted.
       Before, if we added a design document, queried the view,
       deleted the design document and performed a view cleanup
       request, the index file remained on disk.
    
    (Note: cleanup in this context means deleting outdated index files,
    it is not related to the cleanup of data in the index related to
    partitions marked for cleanup)
    
    Change-Id: I865a17fb156b6d252c63b624051288325dd22ec9
    Reviewed-on: http://review.couchbase.org/11053
    Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Nov 21, 2011
  3. @chiyoung

    Revert "Change internal consistency checks from Md5 for crc32."

    This reverts commit bd9ad9c.
    
    Change-Id: I87c53ce739ed7aec9ee631ad272c02c1f39d9e89
    Reviewed-on: http://review.couchbase.org/11133
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    chiyoung committed Nov 23, 2011
  4. @chiyoung

    Add garbage_collect call to prevent mem blowup in non-json mode

    Change-Id: Id9e9e749279aab502205fdd958bd08b6c433fd49
    Reviewed-on: http://review.couchbase.org/11126
    Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Damien Katz committed with chiyoung Nov 23, 2011
  5. @chiyoung

    Change internal consistency checks from Md5 for crc32.

    Only for JSON bodies, not for attachments/non-json mode yet.
    
    Change-Id: If152c67c2a28e6c971a00a5bd716c73adc4c718e
    Reviewed-on: http://review.couchbase.org/11033
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Damien Katz committed with chiyoung Nov 18, 2011
Commits on Nov 22, 2011
  1. @fdmanana @alk

    Move set views feature into a separate application

    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>
    fdmanana committed with alk Nov 17, 2011
  2. @fdmanana @alk

    Adjust build process to allow sub-applications

    This is basically part of what was done upstream for preparation
    of the new view engine:
    
    http://svn.apache.org/viewvc?view=revision&revision=1171145
    
    This is a preparation to move the set view indexes into a dedicated
    subdirectory/application so that it's easier to manage and add
    individual etap tests for it.
    
    Change-Id: I3158a6665b5d98ee4e840a47e9d3c2f5f90f6e93
    Reviewed-on: http://review.couchbase.org/11007
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    fdmanana committed with alk Nov 16, 2011
  3. @fdmanana @fdmanana

    Export couch_index_merger:ddoc_not_found_msg/2

    This was not exported, however it is needed by couch_view_merger
    (lines 568 and 844).
    
    Change-Id: I023843d7e0f426b25b5e33f1c11b9453b9b6a4b7
    Reviewed-on: http://review.couchbase.org/11086
    Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Nov 22, 2011
Commits on Nov 21, 2011
  1. @chiyoung

    Fix broken tests by adding #db record changes to tests.

    Change-Id: Ie10b365aa5facddfbd1ec64ce91114e2f1527018
    Reviewed-on: http://review.couchbase.org/11051
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Damien Katz committed with chiyoung Nov 21, 2011
Commits on Nov 18, 2011
  1. @chiyoung

    More efficient file reads by using raw FD in calling process.

    Caller must pass function through couch_db:fast_reads/2 to get benefit.
    
    Change-Id: I0e1177fc627d372b51a4e90a51eb5f790af81b9d
    Reviewed-on: http://review.couchbase.org/10918
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Damien Katz committed with chiyoung Nov 15, 2011
  2. @chiyoung

    More efficient file reading using iolists

    Change-Id: Ic242111c1c7c9e38a748fbe20e2891ab3742b574
    Reviewed-on: http://review.couchbase.org/10878
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Damien Katz committed with chiyoung Nov 15, 2011
  3. @fdmanana @fdmanana

    Fix view group index file descriptor leak

    If a view group is opened and later the corresponding
    design document is updated in a such a way that it
    produces a new view group signature (for example, by
    changing a map function), a new view group will be
    spawned. Requests to /database/_view_cleanup will not
    effectively delete the old index file because the old view
    group is still alive and holding a reference counter
    associated to that old index file (unless the server is
    restarted).
    
    COUCHDB-1309
    
    Change-Id: I7e0fa6e8d669713b11b36c7674e853e680539570
    Reviewed-on: http://review.couchbase.org/10165
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Oct 17, 2011
Commits on Nov 17, 2011
  1. @fdmanana @fdmanana

    Replicator: encode query string parameter values

    According to RFC3986 [1], characters like "[", "]" and "," must
    be percent encoded when used in values of query string parameters.
    One such query parameter example is ?open_revs whose value is a
    JSON array of strings (which always contains "[", "]" and ",").
    
    [1] http://tools.ietf.org/html/rfc3986#section-2.2
    
    Change-Id: I7877cd3085c95863a7166f737a36e6d849b7c509
    Reviewed-on: http://review.couchbase.org/10981
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Nov 17, 2011
  2. @fdmanana @fdmanana

    Fix replicator doc GET requests for many revisions

    Mochiweb limits request lines up to 8192 characters but the
    replicator wasn't accounting for the verb and protocol parts
    of the first request line ("GET " + " HTTP/1.1\r\n")
    
    Closes COUCHDB-1340.
    
    Change-Id: I4b2da81a6f74a7d11ab7559f8fa5ebfcc81cdca0
    Reviewed-on: http://review.couchbase.org/10980
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Nov 17, 2011
  3. @fdmanana @fdmanana

    Cleanup port messages in the mailbox

    If prompt_many/2 fails, there's a possibility of
    leaving port messages in the caller's mailbox.
    This ensures the mailbox doesn't grow when there's
    such an error (one port write operation failed, but
    subsequent ones succeed, and the port error on write
    didn't cause the port to be closed).
    
    Change-Id: Ie82014413357b9e1b34335e7b15186abfef90a30
    Reviewed-on: http://review.couchbase.org/10834
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    fdmanana committed with fdmanana Nov 14, 2011
  4. @fdmanana @fdmanana

    Add test test/etap/242-replication-many-leaves.t

    Change-Id: Ia78ca876251949bacc8249b737722d27ed6cfceb
    Reviewed-on: http://review.couchbase.org/10964
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    fdmanana committed with fdmanana Nov 17, 2011