Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added Memory Hooks #8

Closed
wants to merge 22 commits into from

4 participants

@mikewied

No description provided.

trondn and others added some commits
@trondn trondn Merge remote branch 'core/engine-pu' into update
* core/engine-pu:
  Add -xc99=all for Sun Studio
  Fixed make rules for --enable-dtrace
  Issue 183 - Reclaim items dead by flush_all
  Issue 200: Don't fire dtrace probe as the last thing in a function
a0147e2
@trondn trondn Fix compilation warning when compiling without SASL support
We're calling exit() if the source isn't built with SASL support
if the user tries to use the -S command line argument (causing
some compilers to emit warnings about statement never reached)
67590c2
@trondn trondn Check for the existence of __builtin_expect before defining it
Just testing for gcc might not be sufficient
da3493d
@trondn trondn Define _GNU_SOURCE for Linux when using Oracle Solaris Studio on Linux cb6290c
@trondn trondn Merge remote branch 'core/engine-pu' into branch-20
* core/engine-pu:
  Define _GNU_SOURCE for Linux when using Oracle Solaris Studio on Linux
  Check for the existence of __builtin_expect before defining it
  Fix compilation warning when compiling without SASL support
fa613ad
@trondn trondn Don't include stdbool.h when included from C++ bbafc07
@trondn trondn Merge remote-tracking branch 'core/engine-pu' into branch-20
* core/engine-pu:
  Don't include stdbool.h when included from C++
091c322
@trondn trondn Made the output from engine_testapp more compact
Added -v to print out in verbose mode

Change-Id: I69e81a7a7d478a9d13a12f6010db2801d8e9a710
4135fd4
@trondn trondn Refactor: Don't export ntohll/htonll from memcached/util.h
This cause problems if it's already exported from another
header. Instead prefix it with memcached

Change-Id: I0e8f17a56f8896b65a24fb2673ea31970b8917e6
a348ba7
@trondn trondn Remove memcacheed.spec from extra_dist
Change-Id: I529029dbd9ce438bfb9c54718c2937b1198c4c87
ca7cc85
@trondn trondn Add fragment_rw.h to the dist file
Change-Id: I3cb737f498c67fcd317b8e18e1b8f7199466579e
016de67
@trondn trondn Removed topkeys implementation
Measurements showed memcached only able to handle about 50% of the
operations with top keys on vs. when it was off.

Change-Id: I11a9caadb248c63624cc9b19b2cc4331def86922
d9be1f2
@trondn trondn Print out the number of test cases in engine_testapp
Change-Id: Ied54c0dc33ab241480f5837db14ef4521dfc410c
2f1753c
@bcui6611 bcui6611 Remove topkeys implementation for windows build
Change-Id: I1b971bc6d905a8de2ec4d18e10f0d12cc9beb771
02debae
@trondn trondn Fix bug related to ADD with the binary protocol and CAS != 0
The conversion from a SET/REPLACE command to a CAS command also
included ADD. From a logic perspective that doesn't make much
sense: "Add this object to the cache if it doesn't exists,
but only add it if the object in the cache contains this exact
identifier"

Change-Id: I22774cfe92fc698db1683e62e53a6c4671665d5e
2ca5ee4
@trondn trondn Initial support for IO vectors
Allow the engines to split up a value into smaller chunks. All
allocations from the frontend will require a continuous segment,
but the engine may decide to split the object during the store
process.

Change-Id: I2318e53a371518b45e85781f8c0b22f4029b2fde
6fd31b6
@trondn trondn Ignore config.cache
Change-Id: I762dc601e5b3f4d32f1381dd5e2c77efad2669b9
84728d0
@chiyoung chiyoung Add a more descriptive error message to an ascii GET response.
Change-Id: Idcbb76b588849e5e8691f7214a1f276f6d1e4aeb
fd28ee4
@trondn trondn Add "stats connections" to dump all connections
Change-Id: Ife8978790e9d5c50362afcf8c9edc5802117364f
3797ae0
@mikewied mikewied Added tcmalloc/tcmalloc-minimal to build script
Change-Id: I1be0b10a5760813d5458175c54a0ea513a96fe34
37fd61b
@mikewied mikewied Added allocation hooks to engine hooks api
Change-Id: I7593d8e45ce063b45207b9c2ee0e0b7259eca2a5
843b53e
@mikewied mikewied Allocator hooks no longer cares who the allocator is
Change-Id: I4ee9ee6f5ff333edc9c32db6389eaaa1e1b09549
f34f19c
@mikewied mikewied closed this
@ns-codereview ns-codereview referenced this pull request from a commit
@daverigby daverigby Fix race in memcached_uptime access
Identified by ThreadSanitizer:

WARNING: ThreadSanitizer: data race (pid=34137)
  Write of size 4 at 0x7fa0ab35b288 by main thread:
    #0 mc_time_clock_tick() /home/daver/repos/couchbase/server/memcached/daemon/mc_time.cc:171 (memcached+0x0000000f9df3)
    #1 mc_time_clock_event_handler(int, short, void*) /home/daver/repos/couchbase/server/memcached/daemon/mc_time.cc:158 (memcached+0x0000000fa08f)
    #2 event_process_active_single_queue /home/couchbase/jenkins/workspace/cbdeps-build/label/ubuntu14.04/release/sherlock/deps/packages/build/libevent/libevent-prefix/src/libevent/event.c:1368 (libevent_core-2.0.so.5+0x00000000b7cb)
    #3 __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287 (libc.so.6+0x000000021ec4)

  Previous read of size 4 at 0x7fa0ab35b288 by thread T12 (mutexes: write M45839, write M45891):
    #0 mc_time_get_current_time /home/daver/repos/couchbase/server/memcached/daemon/mc_time.cc:94 (memcached+0x0000000fa0b6)
    #1 do_item_update /home/daver/repos/couchbase/server/memcached/engines/default_engine/items.c:358 (default_engine.so+0x000000008109)
    #2 item_get /home/daver/repos/couchbase/server/memcached/engines/default_engine/items.c:821 (default_engine.so+0x000000007deb)
    #3 default_get /home/daver/repos/couchbase/server/memcached/engines/default_engine/default_engine.c:335 (default_engine.so+0x000000003ef5)
    #4 EWB_Engine::get(engine_interface*, void const*, void**, void const*, int, unsigned short) /home/daver/repos/couchbase/server/memcached/engines/ewouldblock_engine/ewouldblock_engine.cc:247 (ewouldblock_engine.so+0x000000004fc1)
    #5 bucket_get /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:123 (memcached+0x0000000e096a)
    #6 process_bin_packet(conn*) /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:5051 (memcached+0x0000000d2100)
    #7 run_event_loop /home/daver/repos/couchbase/server/memcached/daemon/connections.cc:174 (memcached+0x0000000c70c3)
    #8 thread_libevent_process(int, short, void*) /home/daver/repos/couchbase/server/memcached/daemon/thread.cc:374 (memcached+0x0000000f8fc0)
    #9 event_persist_closure /home/couchbase/jenkins/workspace/cbdeps-build/label/ubuntu14.04/release/sherlock/deps/packages/build/libevent/libevent-prefix/src/libevent/event.c:1319 (libevent_core-2.0.so.5+0x00000000b6c7)
    #10 platform_thread_wrap /home/daver/repos/couchbase/server/platform/src/cb_pthreads.c:23 (libplatform.so.0.1.0+0x000000003730)

Change-Id: I9d73a6f5553d88beb1bcc2526763d892fe1b990f
Reviewed-on: http://review.couchbase.org/52484
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
8a92da8
@ns-codereview ns-codereview referenced this pull request from a commit
@daverigby daverigby ewouldblock_engine: Fix data race on cookie_map
As identified by ThreadSanitizer:

WARNING: ThreadSanitizer: data race (pid=950)
  Write of size 8 at 0x7d100002db60 by thread T17 (mutexes: write M45854):
    #0 operator delete(void*) <null>:0 (memcached+0x00000005a6bb)
    #1 __gnu_cxx::new_allocator<...>::deallocate(...) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ext/new_allocator.h:110 (ewouldblock_engine.so+0x000000007677)
    #2 std::_Rb_tree<>::erase(...) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_tree.h:890 (ewouldblock_engine.so+0x000000005890)
    #3 bucket_unknown_command /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:130 (memcached+0x0000000e8cd0)
    #4 process_bin_unknown_packet(conn*) /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:1877 (memcached+0x0000000d2223)
    #5 run_event_loop /home/daver/repos/couchbase/server/memcached/daemon/connections.cc:174 (memcached+0x0000000c70c3)
    #6 event_handler /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:6908 (memcached+0x0000000d7b24)
    #7 event_persist_closure /home/couchbase/jenkins/workspace/cbdeps-build/label/ubuntu14.04/release/sherlock/deps/packages/build/libevent/libevent-prefix/src/libevent/event.c:1319 (libevent_core-2.0.so.5+0x00000000b6c7)
    #8 platform_thread_wrap /home/daver/repos/couchbase/server/platform/src/cb_pthreads.c:23 (libplatform.so.0.1.0+0x000000003730)

  Previous read of size 8 at 0x7d100002db60 by thread T16 (mutexes: write M45851, write M45962):
    #0 std::less<void const*>::operator()(void const* const&, void const* const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_function.h:371 (ewouldblock_engine.so+0x000000006ac8)
    #1 EWB_Engine::should_inject_error(...) /home/daver/repos/couchbase/server/memcached/engines/ewouldblock_engine/ewouldblock_engine.cc:110 (ewouldblock_engine.so+0x000000006c31)
    #2 EWB_Engine::allocate(...) /home/daver/repos/couchbase/server/memcached/engines/ewouldblock_engine/ewouldblock_engine.cc:211 (ewouldblock_engine.so+0x000000004d33)
    #3 add_set_replace_executor(conn*, void*, ENGINE_STORE_OPERATION) /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:3940 (memcached+0x0000000e7b40)
    #4 setq_executor(conn*, void*) /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:4079 (memcached+0x0000000e0496)
    #5 process_bin_packet(conn*) /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:5051 (memcached+0x0000000d2100)
    #6 run_event_loop /home/daver/repos/couchbase/server/memcached/daemon/connections.cc:174 (memcached+0x0000000c70c3)
    #7 event_handler /home/daver/repos/couchbase/server/memcached/daemon/memcached.cc:6908 (memcached+0x0000000d7b24)
    #8 event_persist_closure /home/couchbase/jenkins/workspace/cbdeps-build/label/ubuntu14.04/release/sherlock/deps/packages/build/libevent/libevent-prefix/src/libevent/event.c:1319 (libevent_core-2.0.so.5+0x00000000b6c7)
    #9 platform_thread_wrap /home/daver/repos/couchbase/server/platform/src/cb_pthreads.c:23 (libplatform.so.0.1.0+0x000000003730)

Change-Id: Ia558b1947f2c913d6fa7943de0e85ba975a0c2b1
Reviewed-on: http://review.couchbase.org/52486
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
0ca2c64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 8, 2011
  1. @trondn

    Merge remote branch 'core/engine-pu' into update

    trondn authored
    * core/engine-pu:
      Add -xc99=all for Sun Studio
      Fixed make rules for --enable-dtrace
      Issue 183 - Reclaim items dead by flush_all
      Issue 200: Don't fire dtrace probe as the last thing in a function
  2. @trondn

    Fix compilation warning when compiling without SASL support

    trondn authored
    We're calling exit() if the source isn't built with SASL support
    if the user tries to use the -S command line argument (causing
    some compilers to emit warnings about statement never reached)
  3. @trondn

    Check for the existence of __builtin_expect before defining it

    trondn authored
    Just testing for gcc might not be sufficient
  4. @trondn
  5. @trondn

    Merge remote branch 'core/engine-pu' into branch-20

    trondn authored
    * core/engine-pu:
      Define _GNU_SOURCE for Linux when using Oracle Solaris Studio on Linux
      Check for the existence of __builtin_expect before defining it
      Fix compilation warning when compiling without SASL support
Commits on Aug 12, 2011
  1. @trondn
  2. @trondn

    Merge remote-tracking branch 'core/engine-pu' into branch-20

    trondn authored
    * core/engine-pu:
      Don't include stdbool.h when included from C++
Commits on Jan 15, 2012
  1. @trondn

    Made the output from engine_testapp more compact

    trondn authored
    Added -v to print out in verbose mode
    
    Change-Id: I69e81a7a7d478a9d13a12f6010db2801d8e9a710
  2. @trondn

    Refactor: Don't export ntohll/htonll from memcached/util.h

    trondn authored
    This cause problems if it's already exported from another
    header. Instead prefix it with memcached
    
    Change-Id: I0e8f17a56f8896b65a24fb2673ea31970b8917e6
  3. @trondn

    Remove memcacheed.spec from extra_dist

    trondn authored
    Change-Id: I529029dbd9ce438bfb9c54718c2937b1198c4c87
  4. @trondn

    Add fragment_rw.h to the dist file

    trondn authored
    Change-Id: I3cb737f498c67fcd317b8e18e1b8f7199466579e
Commits on Jan 17, 2012
  1. @trondn

    Removed topkeys implementation

    trondn authored
    Measurements showed memcached only able to handle about 50% of the
    operations with top keys on vs. when it was off.
    
    Change-Id: I11a9caadb248c63624cc9b19b2cc4331def86922
Commits on Jan 18, 2012
  1. @trondn

    Print out the number of test cases in engine_testapp

    trondn authored
    Change-Id: Ied54c0dc33ab241480f5837db14ef4521dfc410c
  2. @bcui6611 @trondn

    Remove topkeys implementation for windows build

    bcui6611 authored trondn committed
    Change-Id: I1b971bc6d905a8de2ec4d18e10f0d12cc9beb771
Commits on Jan 26, 2012
  1. @trondn

    Fix bug related to ADD with the binary protocol and CAS != 0

    trondn authored
    The conversion from a SET/REPLACE command to a CAS command also
    included ADD. From a logic perspective that doesn't make much
    sense: "Add this object to the cache if it doesn't exists,
    but only add it if the object in the cache contains this exact
    identifier"
    
    Change-Id: I22774cfe92fc698db1683e62e53a6c4671665d5e
  2. @trondn

    Initial support for IO vectors

    trondn authored
    Allow the engines to split up a value into smaller chunks. All
    allocations from the frontend will require a continuous segment,
    but the engine may decide to split the object during the store
    process.
    
    Change-Id: I2318e53a371518b45e85781f8c0b22f4029b2fde
Commits on Jan 31, 2012
  1. @trondn

    Ignore config.cache

    trondn authored
    Change-Id: I762dc601e5b3f4d32f1381dd5e2c77efad2669b9
Commits on Feb 1, 2012
  1. @chiyoung @trondn

    Add a more descriptive error message to an ascii GET response.

    chiyoung authored trondn committed
    Change-Id: Idcbb76b588849e5e8691f7214a1f276f6d1e4aeb
  2. @trondn

    Add "stats connections" to dump all connections

    trondn authored
    Change-Id: Ife8978790e9d5c50362afcf8c9edc5802117364f
Commits on Feb 22, 2012
  1. @mikewied

    Added tcmalloc/tcmalloc-minimal to build script

    mikewied authored
    Change-Id: I1be0b10a5760813d5458175c54a0ea513a96fe34
  2. @mikewied

    Added allocation hooks to engine hooks api

    mikewied authored
    Change-Id: I7593d8e45ce063b45207b9c2ee0e0b7259eca2a5
  3. @mikewied

    Allocator hooks no longer cares who the allocator is

    mikewied authored
    Change-Id: I4ee9ee6f5ff333edc9c32db6389eaaa1e1b09549
Something went wrong with that request. Please try again.