Permalink
Commits on Nov 19, 2010
  1. MB-2899 - parsing config using safe_strtoul functions

    steveyen committed with chiyoung Nov 19, 2010
    Change-Id: I32acf0c94a4a8f0b2b9cc0c6e0518739fb71c09b
    Reviewed-on: http://review.membase.org/3741
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
  2. Only put paused conns back into downstream conn pool

    steveyen committed with chiyoung Nov 19, 2010
    Otherwise, if moxi releases a downstream conn that's not paused,
    close that conn.
    
    Change-Id: I8801114c174023e2dfbf2f6fa7bfe3eb0ca06b22
    Reviewed-on: http://review.membase.org/3739
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Commits on Nov 18, 2010
  1. Use msec_current_time to generate ts for logging

    mtaneja committed with steveyen Nov 18, 2010
    Fix for bug MB 2403
    
    Change-Id: Icde54a11fb2b24ec12cf1ce0956d2e19a821cf41
    Reviewed-on: http://review.membase.org/3727
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
  2. inflight downstream conns count assert() fixed

    steveyen committed with chiyoung Nov 18, 2010
    Change-Id: I6b4a8e91e33bf2fa290731ac6316a32c7b09117e
    Reviewed-on: http://review.membase.org/3719
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Commits on Nov 17, 2010
  1. stat for tot_downstream_connect_wait

    steveyen committed with chiyoung Nov 17, 2010
    This is incremented whenever moxi attempts to connect() and
    gets an EINPROGRESS.
    
    Also, made the connect_timeout & auth_timeout more visible
    in the stats output.
    
    Change-Id: I3b3584da3e1cd618462a2aced9d0430f430783c6
    Reviewed-on: http://review.membase.org/3709
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Commits on Nov 16, 2010
  1. usage info for the additional timeouts

    steveyen committed with chiyoung Nov 16, 2010
    Change-Id: I5a875851a27dcb289634985e301c288028f137e7
    Reviewed-on: http://review.membase.org/3690
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
  2. MB-2825 - downstream_conn_queue_timeout

    steveyen committed with chiyoung Nov 14, 2010
    Change-Id: I5ff23cc71cfafdec38b1cef6157f1fc7c942d8a4
    Reviewed-on: http://review.membase.org/3684
    Tested-by: Chiyoung Seo <chiyoung.seo@gmail.com>
    Reviewed-by: Chiyoung Seo <chiyoung.seo@gmail.com>
Commits on Nov 15, 2010
  1. MB-2808 - clear blacklist counters only on a new, good connection

    steveyen committed with seanlynch Nov 14, 2010
    The code was incorrectly clearing the blacklist error counters when
    the blacklist timeout expired.  Instead, moxi should clear the
    blacklist error counters only when it's able to successfully connect
    to a troubled downstream server.
    
    Also, clear any previous downstream timeout whenever a new one needs
    to be registered.
    
    Change-Id: I1df229ed42105e2c7d221bfcd54ab8cefabf652c
    Reviewed-on: http://review.membase.org/3673
    Tested-by: Sean Lynch <seanl@literati.org>
    Reviewed-by: Sean Lynch <seanl@literati.org>
Commits on Nov 13, 2010
  1. MB-2808 - tot_downstream_connect_started stat

    steveyen committed Nov 13, 2010
    Added a new tot_downstream_connect_started, to prove that
    moxi gets stuck in the connect() phase when you kill -STOP
    the memcached that moxi is talking to.
    
    Change-Id: Iedeaff512938e611e402e117ad1544e688a70486
    Reviewed-on: http://review.membase.org/3658
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Tested-by: Steve Yen <steve.yen@gmail.com>
  2. MB-2806 - connect_timeout is now -Z configurable

    steveyen committed with seanlynch Nov 12, 2010
    The timeout for connect() still defaults to 5 seconds,
    but is now optionally -Z command-line configurable.
    
    Change-Id: I6422990b2faedd05eeeeecc7e55c27c64a196a91
    Reviewed-on: http://review.membase.org/3657
    Reviewed-by: Sean Lynch <seanl@literati.org>
    Tested-by: Sean Lynch <seanl@literati.org>
  3. MB-2802 - binary multiget was assert()'ing with downstream timeout

    steveyen committed with seanlynch Nov 12, 2010
    The binary multiget code was never tested with all the downstream
    timeout configurations enabled, and triggered an assert().  The
    solution is to clear out any previous timeout registration before
    trying to register a brand new timeout.
    
    Change-Id: Icc5666cacbca98bc3fd3b1d82a1245f387e9c6a8
    Reviewed-on: http://review.membase.org/3655
    Reviewed-by: Sean Lynch <seanl@literati.org>
    Tested-by: Sean Lynch <seanl@literati.org>
  4. MB-2807 - moxi configuration synonyms

    steveyen committed with seanlynch Nov 12, 2010
    -- "concurrency" is a new synonym for the ever-confusing
       "downstream_max".
    
    -- "downstream_conn_timeout" is new synonym for
       "downstream_timeout".
    
    Change-Id: I9c88b7f53658bfcb19a3f2360e15bbcae3f24a9a
    Reviewed-on: http://review.membase.org/3654
    Reviewed-by: Sean Lynch <seanl@literati.org>
    Tested-by: Sean Lynch <seanl@literati.org>
  5. cproxy_clear_timeout() helper func

    steveyen committed with seanlynch Nov 12, 2010
    Change-Id: If600cdb2c35cdab86282ad22259bdf54d49592b2
    Reviewed-on: http://review.membase.org/3653
    Reviewed-by: Sean Lynch <seanl@literati.org>
    Tested-by: Sean Lynch <seanl@literati.org>
Commits on Nov 12, 2010
  1. MB-2803 - fixed assert in zstored_release_downstream_conn

    steveyen committed with seanlynch Nov 12, 2010
    moxi was assert()'ing because moxi might now release the downstream
    conn back to the downstream conn pool during a broadcast command while
    the downstream conn is in conn_connecting state.
    
    And, this showed a related problem, where cproxy_server_index()
    might return -1, in the case when all servers were down.
    
    Change-Id: I78b4d31609bb94a5831786808514506e78440130
    Reviewed-on: http://review.membase.org/3645
    Reviewed-by: Sean Lynch <seanl@literati.org>
    Tested-by: Sean Lynch <seanl@literati.org>
  2. MB-2810 - check select() return code more

    steveyen committed with seanlynch Nov 12, 2010
    Change-Id: Ibfd431e0692a23ad7380eb31ef401d75d59f825b
    Reviewed-on: http://review.membase.org/3639
    Tested-by: Sean Lynch <seanl@literati.org>
    Reviewed-by: Sean Lynch <seanl@literati.org>
Commits on Nov 11, 2010
  1. MB-2724 - configurable auth_timeout with auth timeout blacklisting

    steveyen committed with seanlynch Nov 11, 2010
    auth_timeout is now command-line configurable, and can now be used
    with the zstored downstream conn blacklisting flags.  For example...
    
        cycle=200,
        connect_max_errors=10,
        connect_retry_interval=30000,
        auth_timeout=100,
        ...
    
    A new tot_auth_timeout stat also tracks how often we see
    an auth timeout error.
    
    Change-Id: Idfb64d627ff0b5b470332efb640b498382d9e5bf
    Reviewed-on: http://review.membase.org/3628
    Tested-by: Sean Lynch <seanl@literati.org>
    Reviewed-by: Sean Lynch <seanl@literati.org>
Commits on Nov 10, 2010
  1. MB-2689 - call select() right

    steveyen committed Nov 10, 2010
    Change-Id: I02bdcff66390bafb76cab93b55d1d7585d1df418
    Reviewed-on: http://review.membase.org/3618
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
  2. MB-2689 - use timeout if any part is nonzero

    steveyen committed Nov 10, 2010
    Change-Id: I0c1d2104353879b0936369da15f8481cadf0aca6
    Reviewed-on: http://review.membase.org/3614
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
  3. more logging of key in ascii get response

    steveyen committed Nov 10, 2010
    Change-Id: I77479157c6440f11740d445e1ccb57fac833d039
    Reviewed-on: http://review.membase.org/3607
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
  4. MB-2689 - add timeout to moxi SASL auth & bucket select requests

    steveyen committed with seanlynch Nov 9, 2010
    In this change, moxi SASl auth and bucket select are still
    synchronous, but have additional configurable timeouts (via the
    downstream_timeout configuration parameter).
    
    This is done by adding a select() with timeout mcs_io_read(),
    which shouldn't be too horrible as SASL auth should be very
    infrequent due to long-lived, reused connections.
    
    The alternative solution of rewriting SASL auth and bucket-select, in
    comparison, to be asynchronous is a lot of effort.
    
    Change-Id: I61f31fb3a4c4a994ff79d6a9f909ca578ae02236
    Reviewed-on: http://review.membase.org/3604
    Reviewed-by: Sean Lynch <seanl@literati.org>
    Tested-by: Sean Lynch <seanl@literati.org>
  5. bug MB-2660 - downstream_conn_max fix on closed conns

    steveyen committed with seanlynch Nov 9, 2010
    When a downstream conn was closed, moxi wasn't decrementing the
    dc_acquired counter correctly (via zstored_error_count()), leading to
    a locked up moxi.
    
    The test script ./t/issue-MB-2660.sh no longer locks up with this fix.
    
    Change-Id: I5b5dccbe63f3d685ed7cb6f80157611f01a13a2d
    Reviewed-on: http://review.membase.org/3603
    Tested-by: Sean Lynch <seanl@literati.org>
    Reviewed-by: Sean Lynch <seanl@literati.org>
Commits on Nov 8, 2010
  1. downstream_max of 0 means unlimited

    steveyen committed Nov 8, 2010
    Change-Id: Ie96773eea36983fb7a3d546f0a7b4105d54cd968
    Reviewed-on: http://review.membase.org/3582
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
  2. MB-2690 - don't assert on STATS error

    steveyen committed with dustin Nov 8, 2010
    Change-Id: I09987384feb3a04f212dcb206d9668b44703e749
    Reviewed-on: http://review.membase.org/3579
    Tested-by: Dustin Sallings <dustin@spy.net>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
Commits on Nov 5, 2010
  1. MB-2672 - moxi logs at -v level when config is received

    steveyen committed with seanlynch Nov 5, 2010
    When moxi has verbosity level > 0 (-v or greater), and moxi receives a
    configuration JSON message on the REST/URL stream, it will now log...
    
      2010-11-04 18:22:23: (agent_config.c.389) configuration received
    
    Change-Id: I667a3fe877f6c65cf5f126160468e9a47aa306c8
    Reviewed-on: http://review.membase.org/3560
    Tested-by: Sean Lynch <seanl@literati.org>
    Reviewed-by: Sean Lynch <seanl@literati.org>
  2. MB-2670 - stats proxy config

    steveyen committed Nov 5, 2010
    If moxi was started with ketama hashing...
    
     $ ./dev/moxi/moxi -z 11211=127.0.0.1:11411,127.0.0.1:11511
    
    Then "stats proxy config" would return...
    
     $ echo stats proxy config | nc 127.0.0.1 11211
     STAT 11211:default:config 127.0.0.1:11411,127.0.0.1:11511
     END
    
    If moxi was started with membase REST/URL/JSON, then you'll see JSON...
    
     $ echo stats proxy config | nc 127.0.0.1 11211
     STAT 11211:default:config {
         "name":              "default",
         "nodeLocator":       "vbucket",
         "saslPassword":      "",
         ...clipped...
     }
     STAT 11211:[ <NULL_BUCKET> ]:config
     END
    
    Change-Id: I246a101e1cbf9e9a1f9f23779a47c03fd67ac1ec
    Reviewed-on: http://review.membase.org/3559
    Reviewed-by: Sean Lynch <seanl@literati.org>
    Tested-by: Steve Yen <steve.yen@gmail.com>
Commits on Nov 3, 2010
  1. Implementation for Get Locked (getl) command

    mtaneja committed with steveyen Oct 6, 2010
    support for pessimistic locking command for binary and ascii protocol.
    
    B:localhost:11311 getl k1
    VALUE k1 0 5 41
    dudea
    END
    B:localhost:11311 getl k1
    LOCK_ERROR
    
    Change-Id: Id25fc7a32ee3a80697903f7981c2abf2e580b748
    Reviewed-on: http://review.membase.org/3538
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
Commits on Oct 18, 2010
  1. implemented gdb-callable connections_diag

    Aliaksey Kandratsenka committed with steveyen Oct 18, 2010
    This provides relatively easily accessible high-level diagnostics of
    what is going on inside moxi
    
    Change-Id: Iff04d63be694891bf0d329a89bc83ad5ffbd22b1
    Reviewed-on: http://review.membase.org/3302
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
Commits on Oct 14, 2010
  1. bug 2759 - two is not enough verbosity

    steveyen committed Oct 12, 2010
    Change-Id: Idf6a3812f19d6a82f485434f99dce3bfb28acf2f
    Reviewed-on: http://review.membase.org/3236
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Oct 12, 2010
  1. Don't loose the cppflags added by automake

    trondn committed with dustin Oct 11, 2010
    This includes an -I directive to allow compilation of moxi from
    another directory (eg. ../moxi/configure && make )
    
    Change-Id: Ie84242bc12cfaee08e65ac1217fa161473131e9b
    Reviewed-on: http://review.membase.org/3222
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Tested-by: Dustin Sallings <dustin@spy.net>
Commits on Oct 5, 2010
  1. bug 2600 - fcntl() F_GETFL was lying on windows

    steveyen committed Oct 5, 2010
    The bad effect was that all sockets on windows ended up being
    incorrectly in blocking mode instead of non-blocking mode,
    after doing a sasl-auth.
    
    Change-Id: I06d8a1447b33bbeef4aa35bf119a9c448e635a55
    Reviewed-on: http://review.northscale.com/3047
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
Commits on Oct 4, 2010
  1. more asserts around read()

    steveyen committed Oct 4, 2010
    Change-Id: Iea765fa712daad66c24176468c19b5e0c3e34f55
    Reviewed-on: http://review.northscale.com/3035
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
Commits on Oct 3, 2010
  1. bug 2570 - downstream_conn_max unlimited again

    steveyen committed Oct 3, 2010
    Change-Id: If48ad1ab11023e2ecf7d681d14a5f32fc4cc3876
  2. use appropriate lock before accessing proxy->name

    steveyen committed Oct 3, 2010
    Change-Id: I4b38326385bb0ed0565cde998a0e23d3f1e6cfea
  3. bug 2605 - propagate usr/pwd correctly to mcs layer

    steveyen committed Oct 2, 2010
    A helpful fix for empty-password buckets like the default bucket.
    The host_ident hash string caching in mcs, in particular, was
    sensitive to formatting NULL vs empty ("") passwords.
    
    Change-Id: I17650074e2a962881f9904c7c6ede218f58ae9d5
    Reviewed-on: http://review.northscale.com/2998
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>
Commits on Oct 2, 2010
  1. logging had 1 too many ampersands

    steveyen committed Oct 2, 2010
    Change-Id: I69af882a1cda688f3c9b4f533be662fd482115ad
    Reviewed-on: http://review.northscale.com/2992
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Steve Yen <steve.yen@gmail.com>