Permalink
Commits on Jun 3, 2013
  1. Revert "MB-8348: implemented option for compactor's --evict flag"

    apage43 committed Jun 3, 2013
    This reverts commit fd5240a.
    
    Change-Id: I274a5177805c15d65d03a6ee6f0a80e641c82548
    Reviewed-on: http://review.couchbase.org/26679
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Aaron Miller <apage43@ninjawhale.com>
Commits on May 31, 2013
  1. MB-7058 Don't create /var/{log,lib,run}/couchdb directories.

    aartamonau committed with alk May 31, 2013
    Change-Id: If3ff61ec7131392548809689f96b09dfa08febd6
    Reviewed-on: http://review.couchbase.org/26648
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on May 28, 2013
  1. MB-8348: implemented option for compactor's --evict flag

    Aliaksey Kandratsenka committed with apage43 May 24, 2013
    Change-Id: I505a21e2e1d8a517c4cd47de02fa82b6c8199874
    Reviewed-on: http://review.couchbase.org/26526
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Aaron Miller <apage43@ninjawhale.com>
    Tested-by: Aaron Miller <apage43@ninjawhale.com>
Commits on May 17, 2013
  1. MB-8010: update couchbase logo

    bcui6611 committed May 17, 2013
    Change-Id: I48df0ab2a53b859b67ea2126bdd4d846e749cbee
    Reviewed-on: http://review.couchbase.org/26369
    Reviewed-by: Bin Cui <bin.cui@gmail.com>
    Tested-by: Bin Cui <bin.cui@gmail.com>
Commits on Apr 17, 2013
  1. MB-8109 Set pending transition for outdated updater groups

    fdmanana committed with fdmanana Apr 17, 2013
    This was missing in MB-7522, commit ac82c60.
    
    Change-Id: I7a17b90b0aa4500956661fcd468e4978fbae0623
    Reviewed-on: http://review.couchbase.org/25725
    Reviewed-by: Fulu Li <fulu@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Apr 2, 2013
  1. MB-7989 Add missing check for pending transition's contents

    fdmanana committed with fdmanana Apr 2, 2013
    If a partition is requested to move into the active or passive
    state and it's currently already in that desired state and
    marked as unindexable, check if it's already in that state
    in the pending transition as well - when it is, don't raise
    an error, just accept it as it's a noop.
    
    This fixes commit 01d7e11 and
    adds a specific test for this case.
    
    Change-Id: I9d68556f03c0b1d56520a5023f91debfafd0c786
    Reviewed-on: http://review.couchbase.org/25438
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Mar 28, 2013
  1. MB-7978 Remove list reversal

    fdmanana committed with fdmanana Mar 28, 2013
    Missed in commit 912b866.
    Just a mirror of couch_set_view_mapreduce.erl until
    development views, single partition, use set views.
    
    Change-Id: Ic657dde47c08f413efe291cf59674960fc5ade61
    Reviewed-on: http://review.couchbase.org/25397
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. Remove --check_plt flag passed to dialyzer

    fdmanana committed with fdmanana Mar 28, 2013
    Accidently added in 88623b5.
    
    Change-Id: Ic77c4a635bbf8cd2ffce75294aeec499d4c0d041
    Reviewed-on: http://review.couchbase.org/25396
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. MB-7882 Binary optimize remove_block_prefixes/2

    fdmanana committed with fdmanana Mar 28, 2013
    Using the +bin_opt_info flag, the Erlang compiler told the
    remove_block_prefixes/2 function was not binary optimized:
    
    /opt/r14b04/bin/erlc -I../../src +bin_opt_info  couch_file.erl;
    ./couch_file.erl:564: Warning: INFO: matching anything else but a plain variable to the left of binary pattern will prevent delayed sub binary optimization; SUGGEST changing argument order
    
    After this change, the compiler now tells us it is optimized:
    
    /opt/r14b04/bin/erlc -I../../src +bin_opt_info  couch_file.erl;
    ./couch_file.erl:564: Warning: OPTIMIZED: creation of sub binary delayed
    ./couch_file.erl:570: Warning: OPTIMIZED: creation of sub binary delayed
    
    Change-Id: I746dcf440a83789302a801318d4839e97b7c5287
    Reviewed-on: http://review.couchbase.org/25395
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  4. MB-7882 Optimize btree node decoding

    fdmanana committed with fdmanana Mar 28, 2013
    Using the +bin_opt_info flag, the Erlang compiler told the
    decode function was not binary optimized:
    
    /opt/r14b04/bin/erlc -I../../src +bin_opt_info  couch_btree.erl;
    ./couch_btree.erl:70: Warning: NOT OPTIMIZED: sub binary used by binary:copy/1
    ./couch_btree.erl:433: Warning: NOT OPTIMIZED: called function decode_node/3 does not begin with a suitable binary matching instruction
    ./couch_btree.erl:442: Warning: NOT OPTIMIZED: called function decode_node/3 does not begin with a suitable binary matching instruction
    
    After this change, the compiler tells it is now optimized:
    
    /opt/r14b04/bin/erlc -I../../src +bin_opt_info  couch_btree.erl;
    ./couch_btree.erl:73: Warning: NOT OPTIMIZED: sub binary used by binary:copy/1
    ./couch_btree.erl:436: Warning: OPTIMIZED: creation of sub binary delayed
    ./couch_btree.erl:447: Warning: OPTIMIZED: creation of sub binary delayed
    
    Change-Id: Ie14a85a76a4e00f1f6aac99e19218fbd9841022c
    Reviewed-on: http://review.couchbase.org/25394
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  5. MB-7978 Fixes to view tree with multiple reducers

    fdmanana committed with fdmanana Mar 27, 2013
    A view tree with multiple reducers where not all of them
    are native (_count, _sum, _stats) or custom (JavaScript)
    was not working anymore since the termless storage format,
    and it became undetected for so long due to the fact that
    old JavaScript testsuite (Futon) was removed (commit
    304cbbd) and no equivalent
    etap tests existed.
    
    A view tree with multiple reducers only exists when 2 or
    more views in the same design document have exactly the same
    map function, on a byte by byte basis, and different reduce
    functions (builtin or custom).
    
    Change-Id: Id3218842da83e9e26339e6c59dd7c9b2e8d6a999
    Reviewed-on: http://review.couchbase.org/25390
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  6. Log decoded KV list on reduce failure

    fdmanana committed with fdmanana Mar 27, 2013
    So that we don't need to decode it when debugging failures.
    This was not the case before support for termless format
    storage was added.
    
    Change-Id: I38019caf5235c234441c42ab2650540cf201deef
    Reviewed-on: http://review.couchbase.org/25361
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  7. MB-7882 Simple btree optimizations

    fdmanana committed with fdmanana Mar 27, 2013
    This change removes some inefficiencies in the btree module:
    
    1) Building unnecessary tuples when the extract and assemble
       functions are the default ones (as is the case for views).
       For this case, just don't build any tuples nor do any
       assemble/extract function calls;
    
    2) Traversing a list of KVs and applying the assemble function
       to build a new list - this is waste of time and cpu when
       the assemble function is the default one (as in the case for
       views);
    
    3) Traversing the same list 2 times and reversing an accumulator
       when encoding a kp node. This can be done in a single pass
       with the list comprehension expression and avoiding the need
       to keep a list accumulator and reverse it at the end.
    
    This was found it profiling data from fprof. Nearly no impact on
    view updates (due to existing pipelining), however view compaction
    had gains of about 6% regarding time. Very small impact as well
    on query response time.
    
    Change-Id: I0b9b8e013deede1bdba86f4f1ba2d4cc052bbbb4
    Reviewed-on: http://review.couchbase.org/25353
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  8. Change dialyzer file path

    fdmanana committed with fdmanana Mar 27, 2013
    So that it guarantees there's no dialyzer plt file versioning
    issues when the same bot is used to run dialyzer for different
    branches of couchdb.
    
    Change-Id: I3e8ee4df225eefaae9077954e7718ab7e43d1a77
    Reviewed-on: http://review.couchbase.org/25354
    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>
Commits on Mar 21, 2013
  1. CBD-790 Build and run on Erlang OTP R16B

    fdmanana committed with trondn Mar 7, 2013
    Upgraded mochiweb to version 2.4.2, so that it doesn't
    require parametrized modules (removed from R16B) and
    remove the unused etap_web and etap_request modules,
    because they used parametrized modules.
    
    This change still allows to build and run with Erlang
    versions R14x and R15x.
    
    Change-Id: Ib108468334b08aa0a29605d22c28a347fb5577d5
    Reviewed-on: http://review.couchbase.org/25265
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
Commits on Mar 20, 2013
  1. Revert "MB-7569 Ignore eacces errors on delete dir init"

    fdmanana committed with fdmanana Mar 15, 2013
    This reverts commit dc873dd.
    Turns out to be a problem, found in MB-7772, and was not really
    a solution for the problem, but more of a workaround to reduce
    the frequency of the issue. CBD-790 is the ultimate solution.
    
    Change-Id: I3c09b81850fe26b62c6f142022ff5c26dd87db42
    Reviewed-on: http://review.couchbase.org/25173
    Reviewed-by: Sriram Melkote <siri.couchbase@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Mar 16, 2013
  1. [bp] CBD-774: Add support for automake 1.13

    trondn committed Jan 16, 2013
    Change-Id: I881af884d4d2bd383a18f9c81099c2e5e7411c14
    Original-Reviewed-on: http://review.couchbase.org/23969
    Reviewed-on: http://review.couchbase.org/25180
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Commits on Mar 8, 2013
  1. MB-7882 No id btree lookups for dynamically added partitions

    fdmanana committed with fdmanana Mar 7, 2013
    If a partition is dynamically added to the updater while
    it's running, add it to the list of new partitions, so
    that id btree lookups aren't performed for documents
    comming from that partition - just like what is done for
    new partitions that were added before the updater started.
    
    This only has impact under high memory pressure scenarios,
    because the same btree nodes will end up being visited
    later by the pipeline stage which updates the btree.
    
    This should have been included as part of the MB-7522,
    commit ac82c60:
    
    "Optimize index state transitions (rebalance)"
    
    Change-Id: If47f821445d0fa5e98ec74d89ea79d1b0a91c45e
    Reviewed-on: http://review.couchbase.org/25050
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. MB-7873 Ensure blocked indexer tasks die if updater dies

    fdmanana committed with fdmanana Mar 6, 2013
    If the updater process dies (shutdown by view group for e.g.),
    ensure the corresponding blocked indexer active task will die
    as well. This is ensured by keeping both processes linked all
    the time.
    
    Change-Id: If326a001c3baa106ea0f2dd46717b881e794fd3b
    Reviewed-on: http://review.couchbase.org/25018
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. More precise compaction time calculation

    fdmanana committed with fdmanana Jan 29, 2013
    When measuring the duration of view compaction, account for
    the initial step of coordinating with the updater if the
    updater is running in parallel. Normally this is very fast,
    but for some edge cases it can take a significant amount of
    time, as it did in MB-7280 (Windows environment).
    
    Change-Id: I666c0d418c6eeda14fee92a89dc2b599b1b48355
    Reviewed-on: http://review.couchbase.org/24255
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/25013
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
  4. Simplify max seq numbers calculation

    fdmanana committed with fdmanana Mar 6, 2013
    Merging 2 lists of sequence numbers (by maximum) is
    already performed by the function process_map_results/3.
    
    Change-Id: I1728dc55ce2a34d3c148bbaa7f6f73e89a69d328
    Reviewed-on: http://review.couchbase.org/25012
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  5. Remove no longer used checkpoint logic

    fdmanana committed with fdmanana Mar 6, 2013
    This is not longer useful as of MB-7413. After each large batch
    is applied a checkpoint is always performed.
    
    Change-Id: I203c6192b9e2a763c9844b868e8de16d5781922f
    Reviewed-on: http://review.couchbase.org/25011
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Mar 4, 2013
  1. MB-7467 Reset task start time after being interrupted

    fdmanana committed with fdmanana Mar 1, 2013
    So that there's no re-attempt to terminate an idle isolate
    if the same mapreduce context is not re-used within the
    next termination period.
    
    Change-Id: Ia9f2a3b3e17cb8abdc055913192ae450a21fd881
    Reviewed-on: http://review.couchbase.org/24953
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. MB-7453: use time() for long running mapreduce task termination

    Aliaksey Kandratsenka committed with fdmanana Dec 27, 2012
    I.e. because previous implementation used clock which is defined to
    reflect CPU time of all process threads.
    
    It should give us more precise long running task termination.
    
    Change-Id: I8ab51cd94a769329be212d24dda6f275287751fe
    Reviewed-on: http://review.couchbase.org/23582
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/24952
  3. MB-7467: use un-lock-ful javascript task termination

    Aliaksey Kandratsenka committed with fdmanana Dec 27, 2012
    I've found that V8's own preemption is not really effective. When we
    wanted to terminate mapreduce task we needed to grab isolate
    lock. Thus we depended not only on v8's preemption (which I've
    confirmed via source code) periodically unlocks isolate and does
    sched_yield, but also on somewhat fair mutex locking.
    
    What I've observed in practice is that sched_yield was apparently not
    enough to give terminateTask thread chance to grab isolate lock in
    time.
    
    Luckily for us, V8 has terminate API that doesn't require locking
    isolate and using it doesn't depend on preemption at all.
    
    Because we don't need taskId anymore I've removed this field. And
    because we don't need preemption anymore (which is costly to setup
    (i.e. spawns thread)), I've removed it too.
    
    Change-Id: I1e194211c477c5fa1ef78d07e1a3cc05b06fa24e
    Reviewed-on: http://review.couchbase.org/23580
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-on: http://review.couchbase.org/24951
  4. MB-7467: added mapreduce test of context usability after timeout

    Aliaksey Kandratsenka committed with fdmanana Dec 27, 2012
    Change-Id: I977b997e70c1b052ee939ca81317094e9b58769c
    Reviewed-on: http://review.couchbase.org/23584
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/24950
Commits on Mar 1, 2013
  1. Merge remote-tracking branch 'origin/2.0.1' into 2.0.2

    fdmanana committed Mar 1, 2013
    * origin/2.0.1:
      MB-7828 Don't attempt to copy purged docs list
    
    Change-Id: If7cf5e471e744a2e7fd9d8f7789b5796fe45bb1c
  2. MB-7813 Allow replicas on transfer to be unindexable

    fdmanana committed with fdmanana Feb 28, 2013
    Previosuly it was not possible to move to the unindexable state
    partitions that are replicas being transferred into the main
    index (marked as passive). This change now allows it, as from
    an external point of view, once a replica is requested to become
    active, it's seen like a regular active partition - the details
    of transferring a replica are meant to be known only internally,
    abstracted from callers.
    
    Change-Id: Ife72afe0e6827427a23b4bf48fe2eb6a48481758
    Reviewed-on: http://review.couchbase.org/24946
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 28, 2013
  1. MB-7828 Don't attempt to copy purged docs list

    apage43 committed with Damien Katz Feb 27, 2013
    We don't have a purged docs list (but we have started using the old
    purge_seq field), and some old code has broken. Removing it.
    
    Change-Id: I1b376920db2acddac595acbab0adb762fd22de44
    Reviewed-on: http://review.couchbase.org/24885
    Tested-by: abhinav dangeti <abhinav.dangeti@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
Commits on Feb 25, 2013
  1. MB-7406: Add updater barrier for spatial indexer

    vmx committed with fdmanana Dec 17, 2012
    Currently there's one spatial indexer for every vBucket,
    hence a lot of updaters are running at the same time.
    This commit adds a barrier, so that you can set the
    maximum number of updaters that should run at the same
    time. The default value is 4. The MapReduce indexer
    already uses such a barrier.
    
    Those two commits should me merged at the same time:
    http://review.couchbase.org/24830
    http://review.couchbase.org/24831
    
    Change-Id: Ie1e2a5b2f50cfa1137ec24ed414e9d8a4adac4d2
    Reviewed-on: http://review.couchbase.org/24830
    Tested-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Fulu Li <fulu@couchbase.com>
    Reviewed-by: Fulu Li <fulu@couchbase.com>
  2. MB-7764 Add test for reduce functions that don't return

    fdmanana committed with fdmanana Feb 17, 2013
    Validate that reduce functions that don't explicitly return,
    implicitely return undefined, which is serialized to a JSON
    value of null.
    
    Change-Id: Ic6ac0fe98f968ab71784927a4b2e62e19fac06af
    Reviewed-on: http://review.couchbase.org/24649
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. MB-7764 Don't crash if reduce function calls emit()

    fdmanana committed with fdmanana Feb 17, 2013
    If a reduce function called emit(), a danling pointer
    was being derreferenced, which lead to a crash.
    
    Change-Id: I3d63ae86e3a4c1027637235210fbd6dc101dc7ac
    Reviewed-on: http://review.couchbase.org/24648
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 18, 2013
  1. Fix race condition in test 05-replicas-transfer.t

    fdmanana committed with fdmanana Dec 28, 2012
    It's possible the compaction finishes before we're able
    to monitor it.
    
    Change-Id: I5b8fdeb0f9d3e0a7715a6b610622024e381a6450
    Reviewed-on: http://review.couchbase.org/23606
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/24662
Commits on Feb 14, 2013
  1. Merge remote-tracking branch 'origin/2.0.1' into 2.0.2

    fdmanana committed Feb 14, 2013
    Change-Id: I7700768e4ceebda2ccbde2ae8166e71f9bb29f73
  2. MB-7631 Interpret bp of 0 as empty body

    apage43 committed with fdmanana Feb 13, 2013
    By convention, in Couchstore/.couch files a body pointer of zero
    indicates that the item has no body/has an empty body.
    
    This commit makes CouchDB also have this behavior (otherwise, it will
    attempt to read data from position 0 in the file when encountering a
    deleted item)
    
    Change-Id: If4229b68a2b6fc79484535619b7acfbc5055ca0e
    Reviewed-on: http://review.couchbase.org/24586
    Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Jin Lim <jin@couchbase.com>
    Tested-by: Aaron Miller <apage43@ninjawhale.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/24596
    Reviewed-by: Aaron Miller <apage43@ninjawhale.com>