Skip to content
Commits on May 4, 2016
  1. @Chippiewill @daverigby

    Add error injection tests to test logging in CouchKVStore

    Chippiewill committed with daverigby Mar 31, 2016
    This patch adds injection of FileOps and a no buffering
    flag in order to allow injection of couchstore's MockOps.
    
    This is used in conjunction with a new MockLogger to allow
    verification of CouchKVStore's logging output.
    
    Change-Id: I489760e74c88acab594d1fd6afd422bb3f6beeb8
    Reviewed-on: http://review.couchbase.org/62492
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
  2. @daverigby

    Unify CouchKVStore::{getItemCount,getDbFileInfo}

    daverigby committed Apr 29, 2016
    CouchKVStore::getItemCount and getDbFileInfo do virtally the same
    thing - open a couchstore file, read the header information and then
    return some subset of that information to the caller.
    
    Given this, we can implement both in terms of a new helper function -
    getDbInfo - which removes all of the code duplication between the two
    (mostly error-handling).
    
    Change-Id: I8338e17f9e9cc31c7273949f9838bb23f618f3dc
    Reviewed-on: http://review.couchbase.org/63527
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
  3. @daverigby

    BGfetcher: Port to C++11 / simplify code

    daverigby committed Apr 26, 2016
    Update the BGFetcher code to C++11 style, and simplify code where
    possible:
    
    * Use more concise range-based for loops.
    * Use auto where suitable.
    * Remove totalfetches - can just use the size of the vector instead.
    * Remove item2Fetch as a member variable - it can be a variable local
      to the run() method.
    
    Change-Id: I150f22adad7e18981ce37b9ebe733693561bd523
    Reviewed-on: http://review.couchbase.org/63454
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
  4. @daverigby

    Remove unused argument from EPStore::persistVBState

    daverigby committed Apr 22, 2016
    The priority argument is not used.
    
    Change-Id: I679b5bf376c8c97e31cde80f97efbfa74c01568d
    Reviewed-on: http://review.couchbase.org/63223
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Reviewed-by: Manu Dhundi <manu@couchbase.com>
  5. @daverigby

    getKeyStats: Remove redundent 'bgfetch' parameter

    daverigby committed Apr 22, 2016
    EventuallyPersistentStore::getKeyStats takes a {bgfetch} parameter to
    determine if a bgfetch should be performed as part of this
    request. However this parameter is redundent - is is only applicable
    if FULL is the current eviction policy, and all callers of the
    function set it to true when FULL is selected.
    
    Therefore remove the parameter to simply the code.
    
    Change-Id: I09b0a211850326aca6ae9c91777c32eb8d0eddbe
    Reviewed-on: http://review.couchbase.org/63186
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Reviewed-by: Manu Dhundi <manu@couchbase.com>
Commits on May 3, 2016
  1. @daverigby

    Expand comments on HashTable class

    daverigby committed Apr 20, 2016
    Change-Id: I29e57009d5df0d0a6eac525d10795c01b169499a
    Reviewed-on: http://review.couchbase.org/63182
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
  2. @daverigby

    Move HashTable to hash_table.{cc,h}

    daverigby committed Mar 30, 2016
    The HashTable class is now a significant size, and has outgrown living
    in the same file as StoredValue. Move it to its own source files
    hash_table.{cc,h}
    
    Change-Id: I9f1938305f5b9637855411463b5620aad2195db4
    Reviewed-on: http://review.couchbase.org/62165
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
  3. @daverigby

    VBucket: Move constructor to .cc

    daverigby committed Mar 30, 2016
    The constructor for VBucket has grown too large to be inlined, plus we
    rarely create them anyways. Move to the .cc file.
    
    Change-Id: Id98d3edbcf06fc33744111f06172cfbb835330fc
    Reviewed-on: http://review.couchbase.org/62164
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
  4. @daverigby

    Remove code duplication in BG fetch completion

    daverigby committed Mar 30, 2016
    completeBGFetch() and completeBGFetchMulti() perform very similar
    tasks, the main difference being completeBGFetchMulti handles multiple
    items. Refactor the code to move all the common work into a new
    completeBGFetchForSingleItem function.
    
    Change-Id: Ied5dc28fd90e2cc2ff748bf9355f774ae0007e02
    Reviewed-on: http://review.couchbase.org/62159
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Commits on Apr 27, 2016
  1. @Chippiewill @chiyoung

    MB-19374 Address datarace in AtomicUnorderedMap::size()

    Chippiewill committed with chiyoung Apr 26, 2016
    std::unordered_map::size() is not thread-safe unless other
    threads are read-only.
    
    WARNING: ThreadSanitizer: data race (pid=131734)
      Write of size 8 at 0x7d580002fc50 by thread T19 (mutexes: read M15526, write M20152):
        #0 std::_Hashtable<unsigned short, std::pair<unsigned short const, SingleThreadedRCPtr<Stream> >, std::allocator<std::pair<unsigned short const, SingleThreadedRCPtr<Stream> > >, std::__detail::_Select1st, std::equal_to<unsigned short>, std::hash<unsigned short>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<unsigned short const, SingleThreadedRCPtr<Stream> >, false>*) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/hashtable.h:1625 (ep.so+0x000000069fa7)
        #1 AtomicUnorderedMap<unsigned short, Stream, SingleThreadedRCPtr<Stream>, std::hash<unsigned short>, std::equal_to<unsigned short>, std::allocator<std::pair<unsigned short const, SingleThreadedRCPtr<Stream> > > >::insert(std::pair<unsigned short const, SingleThreadedRCPtr<Stream> > const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/hashtable.h:1724 (ep.so+0x0000000613e9)
        #2 EvpDcpStreamReq(engine_interface*, void const*, unsigned int, unsigned int, unsigned short, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long*, ENGINE_ERROR_CODE (*)(vbucket_failover_t*, unsigned long, void const*)) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/ep_engine.cc:1512 (ep.so+0x0000000b3737)
    
    ...
    
     Previous read of size 8 at 0x7d580002fc50 by main thread (mutexes: write M14188, write M20259, write M14598):
        #0 DcpProducer::addStats(void (*)(char const*, unsigned short, char const*, unsigned int, void const*), void const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/hashtable.h:500 (ep.so+0x0000000640f4)
        #1 ConnStatBuilder::operator()(SingleThreadedRCPtr<ConnHandler>&) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/ep_engine.cc:3859 (ep.so+0x0000000e02c1)
        #2 EventuallyPersistentEngine::doDcpStats(void const*, void (*)(char const*, unsigned short, char const*, unsigned int, void const*)) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/ep_engine.cc:4116 (ep.so+0x0000000bf61a)
    
    Change-Id: I139ca87ee1e4a1615f84ffc5318f577eee162106
    Reviewed-on: http://review.couchbase.org/63363
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  2. @Chippiewill

    Merge remote-tracking branch 'couchbase/watson' into master

    Chippiewill committed Apr 27, 2016
    * couchbase/watson:
      MB-19354 Make flow-control-manager thread safe
      MB-19255: Modify return types in two DcpMockProducer functions
      MB-19255: Simplify the control-flow of maybeSendNoop
      MB-19255: Only update sendTime if successfully send noop
      MB-19183: Clean-up connection handlers in DCP tests
      MB-16656: Send snapshotEnd as highSeqno for replica vb in GET_ALL_VB_SEQNOS call
    
    Change-Id: Ia5d4a3614e3b112fa45587f4e29e3ee5c4ed4ab4
  3. @owendCB @chiyoung

    MB-19354 Make flow-control-manager thread safe

    owendCB committed with chiyoung Apr 27, 2016
    During shutdown the ConnsLock is not available.
    Therefore make the flow-control-manager thread
    safe as opposed to relying on an external lock.
    
    Change-Id: Ia271a650e29983b8022850edfa193299ddd83f84
    Reviewed-on: http://review.couchbase.org/63409
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 26, 2016
  1. @owendCB @chiyoung

    MB-19255: Modify return types in two DcpMockProducer functions

    owendCB committed with chiyoung Apr 25, 2016
    Relate to comments from the following commit that needed to be
    addressed: e56a8fa
    
    For getNoopPendingRecv() and getNoopEnabled() return "bool"
    instead of Couchbase::RelaxedAtomic<bool>.
    
    Change-Id: I59f5505862d39521f37f424a462498271e8d01a3
    Reviewed-on: http://review.couchbase.org/63303
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
Commits on Apr 25, 2016
  1. @Chippiewill @chiyoung

    Inject logger into scan-context

    Chippiewill committed with chiyoung Apr 20, 2016
    This injects the logger used for scanning in CouchKVStore
    into the scan context (The scan context initialises to the
    global logger by default). The purpose of this is to allow
    for verifying the logging during a scan in CouchKVStore.
    
    Change-Id: I5aedc6852427e7466e2c03f95bc575b1940f6599
    Reviewed-on: http://review.couchbase.org/63103
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Daniel Owen <owend@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 23, 2016
  1. @owendCB @chiyoung

    MB-19255: Simplify the control-flow of maybeSendNoop

    owendCB committed with chiyoung Apr 22, 2016
    Change-Id: If0932bcc2faffdb633ca80c6ffa42a34683e9ef4
    Reviewed-on: http://review.couchbase.org/63229
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Manu Dhundi <manu@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  2. @owendCB @chiyoung

    MB-19255: Only update sendTime if successfully send noop

    owendCB committed with chiyoung Apr 21, 2016
    In the maybeSendNoop function when a DCP producer attempts
    to send a noop to a consumer it can receive back
    ENGINE_SUCCESS or ENGINE_E2BIG.
    
    We should only set pendingRecv to true and update the
    last sendTime if ENGINE_SUCCESS is returned.
    
    Change-Id: Ice8a66dcae35505d7bab7d261f080d5ffb95c8e3
    Reviewed-on: http://review.couchbase.org/63172
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Manu Dhundi <manu@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 19, 2016
  1. @daverigby @chiyoung

    MB-19184: Use AtomicUnorderedMap for PassiveStream::streams

    daverigby committed with chiyoung Apr 14, 2016
    Refactor the streamsMap in DcpConsumer to use the new
    AtomicUnorderedMap class instead of a fixed array of pointers. While
    the fixed array should be safe, it's unnecessarily inefficient in
    terms of space as it always takes up 1024 * sizeof(RCPtr<>), which is
    16KB on x86-64.
    
    Moving to the new AtomicUnorderedMap gives us a single base
    implementation and a memory footprint proportional to the number of
    vbuckets in use.
    
    Change-Id: Ie975b68725f7c3f012c26cfdedd44bf052d42e96
    Reviewed-on: http://review.couchbase.org/62846
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  2. @daverigby @chiyoung

    MB-19184: Add AtomicUnorderedMap class & use for DcpProducer::streams

    daverigby committed with chiyoung Apr 11, 2016
    Create a new container class AtomicUnorderedMap. AtomicUnorderedMap is
    a thread-safe unordered map (associative array).  Elements can be
    added, removed and found concurrently from different threads safely.
    
    Update DcpProducer::streams to use the new class (instead of a vanilla
    std::map + external locking).
    
    Change-Id: Ibed2497551a8248a09f822b0a7167b9e801d20bd
    Reviewed-on: http://review.couchbase.org/62653
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Will Gardner <will.gardner@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 18, 2016
  1. @owendCB @chiyoung

    MB-19183: Clean-up connection handlers in DCP tests

    owendCB committed with chiyoung Apr 18, 2016
    Disconnect the connection handler cleanly instead of
    just calling reset.
    
    This results in the mock_cookie_release being called
    which will free the cookie.  Therefore we do not
    need to explictly delete the cookie at the end of
    each test.
    
    Change-Id: Icd1ea5732045c350471c067c6685a2364cd2a2c2
    Reviewed-on: http://review.couchbase.org/62952
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 15, 2016
  1. @manudhundi @abhinavdangeti

    MB-16656: Send snapshotEnd as highSeqno for replica vb in GET_ALL_VB_…

    manudhundi committed with abhinavdangeti Apr 15, 2016
    …SEQNOS call
    
    For replica vbucket we must send snapshotEnd received in the last snapshotMarker
    as the high seqno. Sending lastClosedChkSeqno can cause problems for view engine
    which builds an index from replica vbucket.
    
    Previously this was sent correctly in seqno stats, now adding it for
    GET_ALL_VB_SEQNOS as well.
    
    Change-Id: I245f345f2f85fe693831f0dbdfdeede31ae638ba
    Reviewed-on: http://review.couchbase.org/62929
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Commits on Apr 14, 2016
  1. @manudhundi

    Merge remote-tracking branch 'couchbase/watson'

    manudhundi committed Apr 14, 2016
    |\
    | * f911af6 2016-04-13 | MB-19029: Wait for consumer task to run before checking backoffs (gerrit/watson, couchbase/watson) [Manu Dhundi]
    | * b4c858e 2016-04-12 | MB-14988: Add helper funcs write_items() and write_items_upto_mem_perc() [Manu Dhundi]
    | * 9303cb9 2016-04-11 | MB-19124: Disconnect existing connection of the same name [Daniel Owen]
    
    Change-Id: Ic16b6a5737fa2189d3fa830acebfa263ed73f6b8
  2. @manudhundi

    MB-19029: Wait for consumer task to run before checking backoffs

    manudhundi committed Apr 13, 2016
    Backfoff stat is updated only after consumer processor task runs. Hence it
    is better to wait for the stat than to query it for a particular value.
    
    Change-Id: I8c88f76d5ac6d6623ae5b3681438a3dd6c05ea65
    Reviewed-on: http://review.couchbase.org/62808
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
    Tested-by: Manu Dhundi <manu@couchbase.com>
  3. @manudhundi

    MB-14988: Add helper funcs write_items() and write_items_upto_mem_perc()

    manudhundi committed Apr 12, 2016
    In ep_testsuite umpteen times we write a bunch of items or items upto a
    memory usage on server. Having helper functions do this will avoid
    unncessary repetition of code.
    
    Change-Id: Ia5b940390f35c828c0c208a79c6af7d5dbdc2bf4
    Reviewed-on: http://review.couchbase.org/62679
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 13, 2016
  1. @owendCB @chiyoung

    MB-19124: Disconnect existing connection of the same name

    owendCB committed with chiyoung Apr 11, 2016
    If a DCP connection request has the same name as an
    existing connections, mark the existing connection
    as "doDisconnect" before creating the new connection.
    ns_server relies on this behaviour.
    
    Change-Id: I008253ad9247a56db21baaaccce9f24df5ff7711
    Reviewed-on: http://review.couchbase.org/62644
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 12, 2016
  1. @manudhundi

    Merge remote-tracking branch 'couchbase/watson'

    manudhundi committed Apr 11, 2016
    |\
    | * 30a9e93 2016-04-08 | MB-19086: Do not read from backfill if the scanBuffer is full (gerrit/watson, couchbase/watson) [Manu Dhundi]
    | * ddc1c0d 2016-04-04 | MB-19033: Release cookie if newProducer/newConsumer fails [Daniel Owen]
    | * 076559b 2016-04-06 | MB-16337: Enable test_access_scanner unit test [Norair Khachiyan]
    | |
    
    Change-Id: Ie2c0c5c4e3dcd6d0e2860b8f965d55e86580a67b
Commits on Apr 11, 2016
  1. @manudhundi @chiyoung

    MB-19086: Do not read from backfill if the scanBuffer is full

    manudhundi committed with chiyoung Apr 8, 2016
    While backfilling, we want to limit the amount of bytes read in one
    run of the backfill (for one vbucket). This commit address a bug in
    that logic.
    
    To test this we need to check how many times the backfill task runs.
    To do this as part of the commit, code to read histogram stats in
    ep_testsuite is added.
    
    Change-Id: Ia5f653325583ebae32e1b858924c29327e035318
    Reviewed-on: http://review.couchbase.org/62463
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  2. @owendCB @chiyoung

    MB-19033: Release cookie if newProducer/newConsumer fails

    owendCB committed with chiyoung Apr 4, 2016
    In the dcpOpen function we first call reserveCookie on a
    connection object and then call newProducer/newConsumer
    to create a new connection.
    
    If the newProducer/newConsumer fails to create a new
    connection and instead returns a nullptr we must call
    releaseCookie before returning ENGINE_DISCONNECT.
    
    A test is also added to ep_testsuite_dcp that provide a
    regression test for the fix.
    
    Change-Id: I1aceea01ae0e764f4118e4a5e5b29e2aa8ff30f0
    Reviewed-on: http://review.couchbase.org/62515
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 8, 2016
  1. @Chippiewill @chiyoung

    Make CouchKVStore::getMultiCb use the context's kvstore's logger

    Chippiewill committed with chiyoung Apr 7, 2016
    This is intended to make it possible to verify the logging output
    in the callback by using the same injected logger as the
    CouchKVStore.
    
    Change-Id: Ib0eafe19e8c5d27b5c4dae99b3762b95e152aaef
    Reviewed-on: http://review.couchbase.org/62563
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Dave Rigby <daver@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Commits on Apr 7, 2016
  1. @nkhachiyan @chiyoung

    MB-16337: Enable test_access_scanner unit test

    nkhachiyan committed with chiyoung Apr 6, 2016
    This test was disabled few weeks ago as it failed on CV runs.
    With latest builds the failure is not reproducable neither on
    local AIX box, nor on Ubuntu container.
    The failure is also not reproducable on jenkins runs.
    Enabling this test on regular CV runs for now.
    
    Change-Id: Ic7852a0d90c01c9571de596567af7d61b3d31b92
    Reviewed-on: http://review.couchbase.org/62520
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  2. @abhinavdangeti

    Merge remote-tracking branch 'couchbase/watson' into master

    abhinavdangeti committed Apr 6, 2016
    couchbase/watson:
    |\
    | * 1bc123b Address data race seen with the module dcp tests
    | * 7480be8 MB-19033 Allow connections of the same name
    | * 6b900ac MB-17230: Do not allow active stream creation over a dead VB
    | * b929e87 MB-17631: Fix intermittently failing CV test case 'test_est_vb_move'
    | * 75487f0 MB-14988: Split TestDcpConsumer::run() into multiple functions
    
    Change-Id: I0294d15bde9dee88e471f2f26177cad7c7a163bf
  3. @abhinavdangeti

    Address data race seen with the module dcp tests

    abhinavdangeti committed Apr 6, 2016
    16:50:07 WARNING: ThreadSanitizer: data race (pid=36686)
    16:50:07   Write of size 8 at 0x7d0c00003ad8 by main thread (mutexes: write M130807):
    16:50:07     #0 operator delete(void*) <null> (ep-engine_dcp_test+0x00000047357b)
    16:50:07     #1 std::_Rb_tree<void const*, std::pair<void const* const, DcpConsumer*>, std::_Select1st<std::pair<void const* const, DcpConsumer*> >, std::less<void const*>, std::allocator<std::pair<void const* const, DcpConsumer*> > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<void const* const, DcpConsumer*> >) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ext/new_allocator.h:110 (ep-engine_dcp_test+0x00000052ad65)
    16:50:07     #2 FlowControl::~FlowControl() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/flow-control.cc:44 (ep-engine_dcp_test+0x000000528ea1)
    16:50:07     #3 DcpConsumer::~DcpConsumer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/consumer.cc:133 (ep-engine_dcp_test+0x00000051b223)
    16:50:07     #4 DcpConsumer::~DcpConsumer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/consumer.cc:130 (ep-engine_dcp_test+0x00000051b815)
    16:50:07     #5 Processer::~Processer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/atomic.h:272 (ep-engine_dcp_test+0x00000051a51c)
    16:50:07     #6 ~SingleThreadedRCPtr /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/atomic.h:272 (ep-engine_dcp_test+0x0000005ba662)
    16:50:07     #7 ExecutorPool::stopTaskGroup(unsigned long, task_type_t, bool) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorpool.cc:594 (ep-engine_dcp_test+0x0000005badee)
    16:50:07     #8 EventuallyPersistentStore::~EventuallyPersistentStore() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/ep.cc:565 (ep-engine_dcp_test+0x00000054f302)
    16:50:07     #9 EventuallyPersistentEngine::~EventuallyPersistentEngine() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/ep_engine.cc:6349 (ep-engine_dcp_test+0x00000059bf7a)
    16:50:07     #10 EvpDestroy(engine_interface*, bool) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/ep_engine.cc:148 (ep-engine_dcp_test+0x00000057e2b7)
    16:50:07     #11 DCPTest::TearDown() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/tests/module_tests/dcp_test.cc:126 (ep-engine_dcp_test+0x0000004e5737)
    16:50:07     #12 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/src/gtest.cc:2402 (ep-engine_dcp_test+0x0000006d7792)
    16:50:07     #13 testing::Test::Run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/src/gtest.cc:2482 (ep-engine_dcp_test+0x0000006a4e31)
    16:50:07     #14 testing::TestInfo::Run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/src/gtest.cc:2656 (ep-engine_dcp_test+0x0000006a6e0b)
    16:50:07     #15 testing::TestCase::Run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/src/gtest.cc:2774 (ep-engine_dcp_test+0x0000006a78ba)
    16:50:07     #16 testing::internal::UnitTestImpl::RunAllTests() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/src/gtest.cc:4649 (ep-engine_dcp_test+0x0000006b84f3)
    16:50:07     #17 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/src/gtest.cc:2402 (ep-engine_dcp_test+0x0000006d8902)
    16:50:07     #18 testing::UnitTest::Run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/src/gtest.cc:4257 (ep-engine_dcp_test+0x0000006b7ad0)
    16:50:07     #19 main /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/googletest/googletest/include/gtest/gtest.h:2237 (ep-engine_dcp_test+0x0000004e2cc0)
    16:50:07
    16:50:07   Previous read of size 8 at 0x7d0c00003ad8 by thread T5 (mutexes: write M130950):
    16:50:07     #0 DcpFlowControlManagerAggressive::handleDisconnect(DcpConsumer*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/flow-control-manager.cc:211 (ep-engine_dcp_test+0x00000052aea8)
    16:50:07     #1 FlowControl::~FlowControl() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/flow-control.cc:44 (ep-engine_dcp_test+0x000000528ea1)
    16:50:07     #2 DcpConsumer::~DcpConsumer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/consumer.cc:133 (ep-engine_dcp_test+0x00000051b223)
    16:50:07     #3 DcpConsumer::~DcpConsumer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/consumer.cc:130 (ep-engine_dcp_test+0x00000051b815)
    16:50:07     #4 Processer::~Processer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/atomic.h:272 (ep-engine_dcp_test+0x00000051a51c)
    16:50:07     #5 ExecutorThread::run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/atomic.h:325 (ep-engine_dcp_test+0x0000005bfa5b)
    16:50:07     #6 launch_executor_thread(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorthread.cc:33 (ep-engine_dcp_test+0x0000005bf885)
    16:50:07     #7 platform_thread_wrap(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/platform/src/cb_pthreads.cc:54 (libplatform.so.0.1.0+0x00000000568b)
    
    Change-Id: I84860030d78d0bc2e5010255e8ba30bec6109719
    Reviewed-on: http://review.couchbase.org/62527
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Manu Dhundi <manu@couchbase.com>
Commits on Apr 6, 2016
  1. @owendCB @chiyoung

    MB-19033 Allow connections of the same name

    owendCB committed with chiyoung Apr 4, 2016
    It was thought that connections would not exist
    in the connection map with the same name.
    
    However the view code does create connections of
    the same name.  As we index on the connection object
    (cookie) as opposed to the name, we can relax the
    constraints to allow connections of the same name.
    
    Change-Id: I721c4d409d7f02119af534cbf1d887d9e65246c3
    Reviewed-on: http://review.couchbase.org/62361
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
    Tested-by: buildbot <build@couchbase.com>
  2. @abhinavdangeti @chiyoung

    MB-17230: Do not allow active stream creation over a dead VB

    abhinavdangeti committed with chiyoung Apr 6, 2016
    + Active and Notifier streams will not be created for
      a vbucket whose state is DEAD, error response will be
      ENGINE_NOT_MY_VBUCKET.
    + Close streams after the vbucket's state has been changed,
      as part of the setVBucketState.
    + Note that acquiring the producer's streamsMutex within
      a vbucket's stateLock shouldn't cause a lock inversion as
      this pattern is followed in several other code paths, for
      example the set->queueDirty->notifyConnection codepath.
    + test case
    
    Change-Id: I905787a74d6eafc2175f1635197bbf825988b8fb
    Reviewed-on: http://review.couchbase.org/62470
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  3. @nkhachiyan @chiyoung

    MB-17631: Fix intermittently failing CV test case 'test_est_vb_move'

    nkhachiyan committed with chiyoung Mar 25, 2016
    This fix has been checked-in in master branch few weeks ago. The test
    occasionally fails in watson branch as well, and this commit will
    prevent that.
    Here are some more details about underlying problem.
    1. Thread A.
    Testcase (actually couple of them) fails in
    "CouchKVStore::getNumPersistedDeletes" proc right after calling
    openDB( ) api with RDONLY mode for bucket 0. It fails because
    this call does not complete with success, and the reason is that
    couch-db "0.couch.1" file attempted to be opened does not exist,
    to be exact has not been created yet, and is not being created in
    this call because the api has RDONLY mode.
    2. Thread B.
    This thread runs "test_setup" proc, as part of which "0.couch.1"
    file for bucket 0 should be created. What we do here is schedule
    task which will create file "0.couch.1" and without waiting till
    it completes start testcase itself in Thread A. And so basically
    there is a racing condition between threads A & B. Though request
    to schedule task for file "0.couch.1" creation in Thread B happens
    before we start testcase in Thread A, this request is not being
    completed by the time openDB call is being issued in Thread A.
    Code committed with check-in allows to fix the testcase, and in
    particularly wait till couch-db file "0.couch.1" will be created,
    so testcase can check that the content of this file is correct
    (numPersistedDeletes == 0) for bucket 0.
    
    Change-Id: I9573ffb86de770f98c366e13fe2866bd0002df21
    Reviewed-on: http://review.couchbase.org/62025
    Tested-by: buildbot <build@couchbase.com>
    Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
  4. @daverigby

    Merge remote-tracking branch 'couchbase/watson' into master

    daverigby committed Apr 6, 2016
    * couchbase/watson:
      MB-18974: Fix intermittant failure in test_expiration_on_warmup (3)
      MB-19043: Fix memory leak in gencode
      MB-18940: Make ExecutorPool::get() thread-safe
    
    Change-Id: I3c1dac894a2ae01563acdf89cd55a1b6d69763a3
Something went wrong with that request. Please try again.