Permalink
Commits on Feb 16, 2017
  1. [Refactor]: Rename C files that including internal.h

    * To support C++ features in internal.h, all *.c files that depend
    on internal.h should be renamed to *.cc.
    
    * Fixed a number of errors and warnings that newly reported by C++
    compiler, such as name mangling and type casting.
    
    Change-Id: I95cca0ffaea29a08a7e72b98d82bc04e8d72768a
    Reviewed-on: http://review.couchbase.org/73705
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    greensky00 committed with jimwwalker Feb 15, 2017
Commits on Feb 14, 2017
  1. Python: Fix missing constant in example1.py

    REV_META_PACK was not available from insert_multi. Also add usage
    message.
    
    Change-Id: Ifb32eb8e5cdf0a0fe6f458990328d3b5f947249e
    Reviewed-on: http://review.couchbase.org/73054
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Manu Dhundi <manu@couchbase.com>
    Reviewed-by: Sriram Ganesan <sriram@couchbase.com>
    daverigby committed with trondn Feb 2, 2017
Commits on Feb 13, 2017
  1. Use cb_mktemp for deduper-test and merger-test

    * deduper-test currently uses the same output file name with merger-test,
    which sometimes results in a false test failure when the previous
    merger-test output file has not been removed properly. We should use
    different test file name.
    
    Change-Id: Ice337c3702ad77d56ac58705577f0850722eddc8
    Reviewed-on: http://review.couchbase.org/73482
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    greensky00 committed with jimwwalker Feb 10, 2017
Commits on Feb 9, 2017
  1. MB-19995: Set default IO read buffer unit size to 4KB and its count t…

    …o 16
    
    * Decreasing the unit size improves the random read performance in heavy
    DGM situation, by reducing the overhead of reading adjacent data.
    
    * Observed more than 10% improvement on both XFS and Ext4 (block size 4KB),
    on Samsung 850 Pro SSD.
    (measured using https://github.com/couchbaselabs/ForestDB-Benchmark ,
     512 bytes * 64M docs, total 38GB data set size, compression disabled,
     7GB available RAM, 4 reader threads)
    
    * No visible difference was seen on spinning disk under heavy DGM and
    uniform random workloads, since disk seek time is the most critical
    bottleneck so that other factors have relatively marginal impact. However,
    when workloads have locality, 4KB unit size shows slightly (~5%) better
    performance than 8KB even on spinning disk.
    
    * To do: will upload a separate commit that makes both unit size and buffer
    count configurable, in order to configure different setting for environments
    that 4KB buffer doesn't work efficiently.
    
    Change-Id: I40d3158aeaf8e17135cc5e76200e95ef1627c25d
    Reviewed-on: http://review.couchbase.org/73259
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    greensky00 committed with daverigby Feb 7, 2017
Commits on Feb 2, 2017
  1. Python: Add example_read.py

    Add a simple example program to read the given key(s) from a
    couchstore file:
    
        python python/example_read.py file.couch key_1234
    
    Note it run with buffering enabled or disabled by specifying the
    --unbuffered option.
    
    Change-Id: I4f236714529ff9c32105226c24e2e795b928086a
    Reviewed-on: http://review.couchbase.org/73052
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    daverigby committed with trondn Feb 2, 2017
  2. couchstore.py: Allow CouchStore objects to disable io buffering

    Add the optional 'unbuffered' flag to CouchStore __init__ method,
    which allows iobuffering to be disabled.
    
    Change-Id: I2f56617ade4fc04f8251d3ff99fd2e77d111dc32
    Reviewed-on: http://review.couchbase.org/73055
    Tested-by: Build Bot <build@couchbase.com>
    Reviewed-by: Will Gardner <willg@rdner.io>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    daverigby committed with trondn Feb 2, 2017
Commits on Jan 27, 2017
  1. Limit scope for "flex_code"

    Change-Id: Ia32c32441ba14f2071729b650c0c2b46ebe1ee84
    Reviewed-on: http://review.couchbase.org/72528
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Jan 26, 2017
  2. Replace duplication of code with a single copy

    Change-Id: I0a27a6df4c3f8b24ff137185ce836013cd86765d
    Reviewed-on: http://review.couchbase.org/72527
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Jan 26, 2017
  3. MB-22168: Make couch_dbump xattr aware

    Change-Id: I1a3ec2d2f10e4b1bed092c61fe93d4762e0710d9
    Reviewed-on: http://review.couchbase.org/72513
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    trondn committed Jan 26, 2017
  4. Don't try to inflate document bodies twice

    Change-Id: Ie3e2fda6e9086cc9bddd8e618e60801a5dab8842
    Reviewed-on: http://review.couchbase.org/72511
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    trondn committed Jan 26, 2017
  5. Print out the decoded datatype bits

    Ex: datatype: 0x05 (json,xattr)
    
    Change-Id: I49c638aec01f5012e57f05cb15a730ecc72b9933
    Reviewed-on: http://review.couchbase.org/72509
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    trondn committed Jan 26, 2017
Commits on Jan 16, 2017
  1. Refactor: use cbcompress for couch_dbdump

    It hides away the details of interacting with snappy and
    allocating / releasing temporary buffers.
    
    Change-Id: I8a3374df231f3a86eb29398416281d19962fd232
    Reviewed-on: http://review.couchbase.org/71854
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Jim Walker <jim@couchbase.com>
    trondn committed with daverigby Jan 11, 2017
Commits on Jan 13, 2017
  1. Refactor: Don't use double negative in if's with else

    It is hard to read stuff like:
    
        if not no bodies
           do stuff
        else
           do stuff
    
    compared to:
    
       if dump bodies
          do stuff
       else
          do stuff
    
    Change-Id: If25d7d35a34fbba36e6ad32d996290371b1015f3
    Reviewed-on: http://review.couchbase.org/71852
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    trondn committed Jan 11, 2017
  2. Fix 'comparison between signed and unsigned' warnings

    The CV builders were incorrectly not checking the correct directories
    for warnings in source files under couchstore/, as such a couple of
    warnings have snook in. Fix them.
    
    Change-Id: I4863df62cb77449e9b23e69d4ba38e59282e51e1
    Reviewed-on: http://review.couchbase.org/71912
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    daverigby committed with trondn Jan 12, 2017
Commits on Dec 10, 2016
  1. Merge tag 'v4.5.1-MP1'

    4.5.1-MP1 release (couchstore)
    
    * tag 'v4.5.1-MP1':
      MB-20769: Convert to cb_malloc memory allocation API
    
    Change-Id: Id467b2bbfe93bbfec66990a5276b6a3fb2845c8e
    daverigby committed Dec 10, 2016
  2. Merge tag 'v4.5.1'

    4.5.1 release (couchstore)
    
    * tag 'v4.5.1':
      [BP] MB-20224: gtest macro changes
    
    Change-Id: I2af69d4f3e9a921103dfdf2ba2e87d3c41127a0d
    daverigby committed Dec 10, 2016
Commits on Dec 7, 2016
  1. MB-21923: Always print number of docs in couch_dbinfo

    - Previously if there were no active (i.e non-deleted) documents in
      a couchstore file then couch_dbinfo would print the message
      "no documents".
    - This means that if there are deleted documents in a file but 0
      non-deleted documents, the information about how many deleted
      docs there are is lost.
    - This commit updates couch_dbinfo to always print out the number
      of deleted and non-deleted docs, as well as the size. This
      should not break any previous functionality as it will just
      display 0 if the file contains no documents.
    
    Change-Id: If76a277629066fcdbf4c7b479d1426b13c4b432e
    Reviewed-on: http://review.couchbase.org/70724
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Patrick Varley <patrick@couchbase.com>
    mattcarabine committed with daverigby Dec 7, 2016
Commits on Sep 20, 2016
  1. Merge tag 'v4.5.0'

    4.5.0 release (couchstore)
    
    * tag 'v4.5.0':
      MB-19605: Fix memory leak upon failure
      MB-19605: Check return value from snprintf
    
    Change-Id: Iec911dbb8a30306f220d82e718eff3101f3b9282
    daverigby committed Sep 19, 2016
Commits on Sep 13, 2016
  1. MB-20769: Convert to cb_malloc memory allocation API

    Replace:
    
    * malloc -> cb_malloc
    * calloc -> cb_calloc
    * realloc -> cb_realloc
    * free -> cb_free
    * strdup -> cb_strdup
    
    Change-Id: Ia9edb231ebad30655489bec1052e4d41eea33a32
    Reviewed-on: http://review.couchbase.org/67306
    Well-Formed: buildbot <build@couchbase.com>
    Reviewed-by: Daniel Owen <owend@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Abhishek Singh <abhishek@couchbase.com>
    daverigby committed Aug 18, 2016
Commits on Jul 29, 2016
  1. MB-20285 Revert startup snapshot blob which hampers performance

    This reverts previous commits related to startup snashpt blob
    creation of builtin JavaScript functions.
    The allocation and deallocation of startup blob during every
    invocation of view binaries like index-builder, compactor
    and index-cleanup, called by couchdb results in degradation
    of performance.
    
    Revert "MB-20084, MB-20085 Initialize V8 startup data blob if reducers defined."
    
    This reverts commit 1c4edd0.
    
    Revert "MB-19899 Initialize V8 only if reduce is implemented"
    
    This reverts commit 44d1df0.
    
    Revert "MB-17567 Add startup snapshot for builtin JavaScript functions"
    
    This reverts commit a75e732.
    
    Change-Id: I4961d1b48fd6e71aa0702be43c747e1115370828
    Reviewed-on: http://review.couchbase.org/66198
    Tested-by: buildbot <build@couchbase.com>
    Tested-by: Pavel Paulau <pavel.paulau@gmail.com>
    Reviewed-by: Abhishek Singh <abhishek@couchbase.com>
    hsharsha committed with hsharsha Jul 26, 2016
Commits on Jul 26, 2016
  1. [BP] MB-20224: gtest macro changes

    backport of 1e52327 (no MB on previous commit).
    
    Improve doctest parameterised test name
    
    Adds a test name generator for the CouchstoreDocTest parameterised
    testing. Also silences warnings introduced by the warning being
    added to Google Test.
    
    Change-Id: Iae14415c549c165a550d79b39df1619e1cac9f9a
    Reviewed-on: http://review.couchbase.org/66217
    Well-Formed: buildbot <build@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Chippiewill committed with jimwwalker Feb 15, 2016
Commits on Jul 6, 2016
  1. MB-20084, MB-20085 Initialize V8 startup data blob if reducers defined.

    Change-Id: I9a73a4346b8e6ab2dbc5c3d8794c320e5634e073
    Reviewed-on: http://review.couchbase.org/65546
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    hsharsha committed with hsharsha Jul 6, 2016
Commits on Jul 4, 2016
  1. MB-19899 Initialize V8 only if reduce is implemented

    Change-Id: If459732d230f26f304cd452c57e1c9b6ac4e53ea
    Reviewed-on: http://review.couchbase.org/65478
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Abhishek Singh <abhishek@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    hsharsha committed with hsharsha Jul 4, 2016
Commits on Jun 24, 2016
  1. Example python script to create couchstore file

    Change-Id: Iadca33234769b88b00f76c075858b31a1b289658
    Reviewed-on: http://review.couchbase.org/65193
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    daverigby committed Jun 23, 2016
Commits on Jun 13, 2016
  1. MB-19783 Use barrier to prevent exit of long running task

    There is a potential race in which terminator thread decides to
    terminate map reduce context and gets switched out of context.
    In the meantime map reduce task is finished normally and the same
    context is reused to perform map reduce for subsequent mutations.
    Now terminator thread will potentially terminate this new task,
    when it is scheduled back to run.
    This is avoided by using mutex in which either terminator thread,
    if successful will terminate long running map reduce task or the
    task is terminated normally.
    
    Change-Id: I86baa697da17aa0e87dd8fae82452231aaa22f20
    Reviewed-on: http://review.couchbase.org/64790
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    hsharsha committed with hsharsha Jun 7, 2016
Commits on May 19, 2016
  1. Remove unused code (md5 hashing lib)

    Change-Id: I124176a1d03875a3e156f130437f8cb743e63b2e
    Reviewed-on: http://review.couchbase.org/64206
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    trondn committed May 19, 2016
Commits on May 16, 2016
  1. MB-19605: Fix memory leak upon failure

    Change-Id: Ia19559c76cad77c0944e65a33ad7fd95b7071e10
    Reviewed-on: http://review.couchbase.org/64071
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    trondn committed May 16, 2016
Commits on May 13, 2016
  1. MB-19605: Check return value from snprintf

    snprintf does not return -1 if the buffer is too small which
    could result in buffer overflows.
    
    Change-Id: I2f9c93d2cf10b1583fff3c6c35b78cfc9c342485
    Reviewed-on: http://review.couchbase.org/63969
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    trondn committed May 12, 2016
  2. MB-19377 Use unordered_set instead of map

    Since key and value stored in map were same, it's better to use
    unordered_set instead of map.
    
    Change-Id: I09a68bf3ecc6b383df1c8f299b15877731ad2ea9
    Reviewed-on: http://review.couchbase.org/63926
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Abhishek Singh <abhishek@couchbase.com>
    hsharsha committed with hsharsha May 11, 2016
  3. Enable asserts in release builds

    Change-Id: I3d9db31a47efb34c5ffd4cde4df60a9b34692c8a
    Reviewed-on: http://review.couchbase.org/63975
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    hsharsha committed with hsharsha May 12, 2016
Commits on May 6, 2016
  1. Merge remote-tracking branch 'couchbase/watson'

    * couchbase/watson:
      MB-18855 Stop transforming error codes when inappropriate
      [BP] Use C++11 primitives for thread creation and synchronization
      [BP] MB-19031 Handle race in updating terminator timeout
    
    Change-Id: I07eda90d95cae23128e6e76885703bfa69620fd1
    Chippiewill committed May 6, 2016
  2. MB-18855 Stop transforming error codes when inappropriate

    In a few instances couchstore will override the error received
    from the underlying fileops and turn it into a fixed error type.
    
    This can be misleading as sometimes an underlying file system
    write can be performed by the iobuffering when reading.
    
    Change-Id: I51cbcc1f4ed39e710d28e61c5b241114d2396b25
    Reviewed-on: http://review.couchbase.org/63743
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Volker Mische <volker.mische@gmail.com>
    Chippiewill committed Mar 23, 2016
  3. [BP] Use C++11 primitives for thread creation and synchronization

    We are mixing older Windows API CreateThread with C++
    primitives for synchronization. This resulted in
    failures in couchdb due to improper exit of index_builder
    thread. Correct way is to use either Windows API for
    creation and synchronization or C++11 primitives and not
    intermix them.
    
    Change-Id: I975e96a617e13dabe559a1b02354857bddeaf53e
    Reviewed-on: http://review.couchbase.org/63745
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Tested-by: buildbot <build@couchbase.com>
    hsharsha committed with Chippiewill Apr 18, 2016
  4. [BP] MB-19031 Handle race in updating terminator timeout

    Change-Id: Id9908e758a443bfe4c0c6b5a379f3dfe3ec159f5
    Reviewed-on: http://review.couchbase.org/63744
    Reviewed-by: Harsha H S <hhs.couchbase@gmail.com>
    Tested-by: buildbot <build@couchbase.com>
    hsharsha committed with Chippiewill Apr 4, 2016
Commits on Apr 25, 2016
  1. Add object lib for test file ops and visibility of create_file_ops

    The purpose of this is to allow usage of create_default_file_ops
    and the test file ops from another project (e.g. ep-engine).
    
    Change-Id: Ida99b74d0994759d792e4f915a83e32f021ddcc5
    Reviewed-on: http://review.couchbase.org/63173
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Jim Walker <jim@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Chippiewill committed Apr 21, 2016