Permalink
Commits on Jun 8, 2011
  1. Change a Bucket instance variable to final.

    Change-Id: I3d505cd6f16bf2b18571f36960f957acea31dabc
    Reviewed-on: http://review.couchbase.org/6868
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Jun 8, 2011
  2. Change ConfigType enum for clarity.

    The word CACHE is a bit too overloaded, even here.  Going to
    MEMCACHE will make things clearer, and so will more docs.
    
    Change-Id: Icace3e363bdab30b15df7e0f9946a8355fa02cc4
    Reviewed-on: http://review.couchbase.org/6867
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Jun 7, 2011
  3. Added logging for manipulation of nodesMap in VBucketLocator.

    Some situations have come up which are unexepctedly causing the
    nodesMap to return a null when identifying the primary for a given
    key.  We will now debug log how we build that map and look at the
    insides of the nodesMap if this situation occurs.
    
    Change-Id: Ia70079265863f17acdb93cc0115e8d43a8930e13
    Signed-off-by: Matt Ingenthron <ingenthr@cep.net>
    Reviewed-on: http://review.couchbase.org/6866
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Mar 18, 2011
  4. Remove standard Authenticator and replace with simple auth header.

    It was found that the Authenticator was caching within the process
    in some cases and in others just plain wasn't working.  Since
    nothing more than HTTP Basic is required at the moment, just add
    our own header.
    
    Change-Id: I6bfce8ba7b51b76c8b99149405b0caadbe60816e
    Signed-off-by: Matt Ingenthron <ingenthr@cep.net>
    Reviewed-on: http://review.couchbase.org/6865
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Feb 26, 2011
  5. Extracted HTTP auth header to common place.

    Change-Id: I530cd25641cfebbb0aebfe13fd250c19a851f8be
    Signed-off-by: Matt Ingenthron <ingenthr@cep.net>
    Reviewed-on: http://review.couchbase.org/6864
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Feb 26, 2011
  6. Change client ctor to detect vbucket usage from server.

    The question about whether or not to use vbuckets is really a
    funciton of the type of configuration the server will hand out.
    There should be no reason to give a URI, bucket name and whether
    or not it's vbucket capable.  That should be discernable from the
    configuration supplied by the server.
    
    This is believed to be compatible with how moxi detects cache
    buckets from membase buckets.
    
    Change-Id: I640fefc37bc863bf5991aa84c6f9fc7e181f5660
    Reviewed-on: http://review.couchbase.org/6863
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Feb 25, 2011
  7. Allow config to handle cache as well.

    Change-Id: I245d89b98279a431008c47ac410c1f63d2ca2aac
    Reviewed-on: http://review.couchbase.org/6862
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Feb 25, 2011
  8. Add a ConfigType via an enum.

    Change-Id: I450402e9d56768378353ebcf77f7ad313093fddf
    Signed-off-by: Matt Ingenthron <ingenthr@cep.net>
    Reviewed-on: http://review.couchbase.org/6861
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Feb 25, 2011
  9. Refactor: not a collection of vbuckets, more of a configuration.

    Change-Id: Ie39c9799fe548c9ab5b01a7d278edab1b5d23aeb
    Reviewed-on: http://review.couchbase.org/6860
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Feb 25, 2011
  10. Added check for moxi when testing.

    Change-Id: Ifbd8d7863adc55f7c6cf31355c87df9a34f75389
    Signed-off-by: Matt Ingenthron <ingenthr@cep.net>
    Reviewed-on: http://review.couchbase.org/6859
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Feb 25, 2011
  11. Assert the node must exist when finding primary.

    Not everyone will have assertions on, but if they do the underlying
    cause of the confusing hostname or IP address lookup would have
    been caught here, rather than in a more confusing place.
    
    Change-Id: I8b8485fe1a1be15d377d39b7b4301024e8d8fd38
    Reviewed-on: http://review.couchbase.org/6858
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Jan 27, 2011
  12. Add both hostnames and IPs to the nodes map.

    Depending on the deployment environment and the configuration, we
    may see either an IP or a hostname from the REST interface.  To ensure
    we can look up the node later, simply add both to the internal Map.
    
    Change-Id: I390d889a67ac61523a0f5485f73cdeab0d768982
    Reviewed-on: http://review.couchbase.org/6857
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Jan 20, 2011
  13. Unit test and javadoc additions.

    Added javadocs for complex classes
    Added a test method to check the vbucket awareness
    
    Change-Id: I243ac1c2ff99bd81531fef5a46a2e94bd151dac7
    Reviewed-on: http://review.couchbase.org/6856
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    bairon committed with ingenthr Nov 24, 2010
  14. Bugfixing not_my_vbucket occurs on optimized set

    Setting correct vbucket index to the optimized set operation
    Added warn message if a not_my_vbucket occurs
    
    Change-Id: I0a1699e88f3ed6ec3d0dc8524ffb1d1c1853a86a
    Signed-off-by: Matt Ingenthron <ingenthr@cep.net>
    Reviewed-on: http://review.couchbase.org/6855
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    bairon committed with ingenthr Nov 15, 2010
  15. Bugfixing of NOT_MY_VBUCKET handling

    Added a collection of nodes that returned NOT_MY_VBUCKET to the operation.
    Changed OperationFactory clone method to copy that collection.
    Correct setting of NOT_MY_VBUCKET status for operation implementations.
    Added getAlternative method in node locator to be called in Retry case.
    Added unit test for getAlternative method
    
    Change-Id: I6c51f1407ebdd5858ffd9342113899c56473408e
    Reviewed-on: http://review.couchbase.org/6854
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    bairon committed with ingenthr Oct 27, 2010
  16. Fixed .classpath file to include all dependencies

    Change-Id: Ic729a3a12b05657bf338cbca0f5a9e173e71ce77
    Reviewed-on: http://review.couchbase.org/6853
    Tested-by: Michael Wiederhold <mike@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Mike Wiederhold committed with ingenthr Jun 8, 2011
  17. Set the status when receiving ERR_NOT_MY_VBUCKET.

    Change-Id: I572375de9f43de1da1a7681206decdf8fcc7f5fc
    Reviewed-on: http://review.couchbase.org/6816
    Reviewed-by: Michael Wiederhold <mike@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Jun 6, 2011
  18. Allow MemcachedClient and connections to be reconfigurable.

    Change-Id: I745ed511aac4af5fbc40244aa5cb8e607cf05f91
    Reviewed-on: http://review.couchbase.org/6815
    Tested-by: Michael Wiederhold <mike@couchbase.com>
    Reviewed-by: Michael Wiederhold <mike@couchbase.com>
    bairon committed with ingenthr Sep 24, 2010
  19. Added VbucketNodeLocator, keyed operation handling.

    Change-Id: I2a64540f6baa711f80af6e2419c30829c6876af8
    Reviewed-on: http://review.couchbase.org/6814
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    bairon committed with ingenthr Sep 24, 2010
  20. Add a configuration provider for bucket updates.

    Change-Id: I202aa38d5c600f1e40febca02f303398a4600977
    Reviewed-on: http://review.couchbase.org/6760
    Reviewed-by: Michael Wiederhold <mike@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    bairon committed with ingenthr Sep 24, 2010
  21. Added bucket monitor with response handler.

    This adds a Bucket monitor with a response handler based on the netty
    framework to read bucket's streaming channel. It passes the received
    configuration to registered observers.
    
    Change-Id: I92472a89f15b9fdbe9725f8a9a4abb2d645a591c
    Reviewed-on: http://review.couchbase.org/6674
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    bairon committed with ingenthr Sep 24, 2010
  22. If it is membase, do not test some things.

    Change-Id: I2fabbb02c298fd3d9c3b32c71d9b69b2a0123c7a
    Reviewed-on: http://review.couchbase.org/6673
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Reviewed-by: Michael Wiederhold <mike@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    ingenthr committed with ingenthr Jan 20, 2011
  23. Added vbucket configuration parser from JSON.

    This parser from JSON has several methods for parsing JSON, beans to
    store configuration settings and unit tests.
    
    Change-Id: I478b274e7901e8c1729c20fcc29577b8aff651af
    Reviewed-on: http://review.couchbase.org/6672
    Reviewed-by: Michael Wiederhold <mike@couchbase.com>
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    bairon committed with ingenthr Sep 24, 2010
Commits on Jun 7, 2011
  1. Added Get And Touch Command

    The get and touch operation  allows the user to get a keys
    value and reset its expiration. Unit tests will come later
    
    Change-Id: I3c65741325aaf979fa55043fb1f0d114e75c1471
    Reviewed-on: http://review.couchbase.org/6813
    Tested-by: Michael Wiederhold <mike@couchbase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Mike Wiederhold committed with trondn Jun 6, 2011
Commits on Jun 6, 2011
  1. Added getl operation

    Getl works with both ascii and binary. Unit test will be added in a future commit
    but this code has been tested thoughly.
    
    Change-Id: I9859d8e3752c519bd0bcf67009a0a3999f5cbbf2
    Reviewed-on: http://review.couchbase.org/6778
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
    Mike Wiederhold committed with mikewied Jun 5, 2011
Commits on Jun 4, 2011
  1. Added touch operation

    Added an operation to reset the expiration time of a key. I have
    tested this code thoughly and will check in the unit tests in a
    later commit.
    
    Change-Id: Iee3045bdb58142dd44c9e8c723dffe7abdbcb230
    Reviewed-on: http://review.couchbase.org/6753
    Tested-by: Michael Wiederhold <mike@couchbase.com>
    Reviewed-by: Matt Ingenthron <matt@couchbase.com>
    Mike Wiederhold committed with mikewied Jun 3, 2011
Commits on Jun 3, 2011
  1. Added TEMP_FAIL handling to set operations

    TMP_FAIL is sent to the client when the server is out of memory.
    The current way of handling this error is to reconnect, but this
    is no the correct way to handle a this error since the server will
    be available soon.
    
    There are other commands that should handle this as well, but right
    now I am only submitting a fix for the set operation since this is
    the operration that causes this error most frequently. We plan on
    adding support for all known Membase commands in a future release.
    
    Change-Id: I8099dd7c85a45c81667e3a566995995dd3780b32
    Reviewed-on: http://review.couchbase.org/6751
    Tested-by: Michael Wiederhold <mike@membase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Mike Wiederhold committed with Jun 3, 2011
  2. Integrated jvbucket

    Added jvbucket 1.0 classes to the project
    
    Change-Id: I8771917e47fd146a371ba33bed7b0ca31cfcbff1
    Reviewed-on: http://review.couchbase.org/6671
    Reviewed-by: Michael Wiederhold <mike@membase.com>
    Tested-by: Michael Wiederhold <mike@membase.com>
    bairon committed with Michael Wiederhold Oct 10, 2010
Commits on May 18, 2011
  1. Buildfile changes to support Maven 2 artifact upload.

    This build file change slightly redefines the artifacts from
    memcached to spymemcached.  This feels right to me.
    
    I've tested the resulting upload with both NetBeans and Eclipse
    Maven support.  I can tell war stories later.
    
    Change-Id: Iee37db23f4a5d02328f8dc62253a87895857f59d
    Reviewed-on: http://review.membase.org/6208
    Tested-by: Matt Ingenthron <matt@couchbase.com>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    ingenthr committed with May 13, 2011
Commits on May 11, 2011
  1. Removed a bit of dead test code.

    Change-Id: I295d7b6b301217866f1074c526cdeba6d60420ab
    Reviewed-on: http://review.membase.org/6152
    Tested-by: Matt Ingenthron <matt@northscale.com>
    Reviewed-by: Matt Ingenthron <matt@northscale.com>
    committed with Matt Ingenthron May 11, 2011
  2. Compilation fix after spring de-generification.

    Change-Id: Ic3cddeedb76ce096569a34e3d8024be06bd4bd62
    Reviewed-on: http://review.membase.org/6151
    Tested-by: Matt Ingenthron <matt@northscale.com>
    Reviewed-by: Matt Ingenthron <matt@northscale.com>
    committed with Matt Ingenthron May 11, 2011
  3. Do not use generics with Spring Factory Bean, be 2.5 compatible.

    To be backward compatible with Spring 2.5, the Factory Bean should
    avoid the use of generics.
    
    Change-Id: I2244a24a051b1b90e4142fa01785ae7e095ed87f
    Reviewed-on: http://review.membase.org/6091
    Reviewed-by: Michael Wiederhold <mike@membase.com>
    Reviewed-by: Nelz <nelz9999@gmail.com>
    Reviewed-by: Luke Lappin <lukelappin@gmail.com>
    Reviewed-by: Eran Harel <harel.eran@gmail.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
    Tested-by: Matt Ingenthron <matt@northscale.com>
    lukelappin committed with Matt Ingenthron May 9, 2011
Commits on May 10, 2011
  1. Increase the maximum size allowed. Issue 106.

    Though memcached still has a 1MiB size by default (overridable
    with a flag), other engines may have their own maximum.  Membase
    for instance has a 20MiB maximum.
    
    Note that the size enforced by the transcoder can be overridden
    through it's ctor.  The reason for making this change is to
    create a new, larger default.
    
    At least for the remainder of the 2.6 series, rather than do
    deep surgery on this issue, just bump up the maximum.
    
    Change-Id: I3e7bb000b12a63b4a299cb8b79a3151fbfc91615
    Reviewed-on: http://review.membase.org/6074
    Reviewed-by: Michael Wiederhold <mike@membase.com>
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Matt Ingenthron <matt@northscale.com>
    ingenthr committed with Matt Ingenthron Apr 19, 2011
Commits on Apr 22, 2011
  1. Search more with the KetamaIterator.

    The existing KetamaIterator implementation, with a small number
    of nodes, may actually hit the same down node multiple times in
    a row leading to failing to find a node when it should find
    another one.
    
    The original libketama[1] hashes each server to 160 numeric
    values.  These are spread out in a 64-bit value.  The key is
    then hashed to a numeric value within that 64-bit value and
    walked forward until it finds a server.
    
    Previously, this library's ketama implementation would only look
    in the consistent hash for a number of iterations limited by the
    number of servers.  With two servers (similar to flipping a
    coin, you'd get heads twice in a row sometimes) you would have
    a 1 in 4 chance of picking the same dead server twice.
    
    The new implementation will iterate based on the number of
    servers, but attempts to keep the probability of hitting the
    same dead server to less than 1% for a two node configuration.
    This will guarantee less than 1% possibility with two or more
    servers.
    
    Because we iterate by simply appending the number of tries on
    the front of the key, we'll be quite random about where in
    the continuium we hit.  Each selection is rather random, but
    for a set of results already calculated, half of which are
    alive and half of which are dead, we can say that in seven
    iterations, there is only a 1/128 [1/(2^7)] chance that we
    would not select once at least one alive server.  The
    probability for any given test still 1/2, but we can describe
    the probability of the iterations.  The key info on this came
    from the "gambler's fallacy"[2].
    
    1. https://github.com/RJ/ketama/blob/master/libketama/ketama.c
    2. http://en.wikipedia.org/wiki/Gambler's_fallacy
    
    Other references:
    http://answers.google.com/answers/threadview/id/568615.html
    http://en.wikipedia.org/wiki/Combinations
    
    Change-Id: I6fa52c0b02516b68ca8da26e4fd85bb1730b82b2
    Reviewed-on: http://review.membase.org/5207
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Matt Ingenthron <matt@northscale.com>
    ingenthr committed with Matt Ingenthron Mar 23, 2011
  2. Separate the KetamaIterator for future dynamic configuration.

    Some future implementations may want to have dynamic changes to
    the nodes list, so the KetamaIterator has been refactored to its
    own class so it can be replaced while a client is instantiated.
    
    Change-Id: I0c8102bf737226c054662b043661ec97907a283b
    Reviewed-on: http://review.membase.org/5206
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Matt Ingenthron <matt@northscale.com>
    ingenthr committed with Matt Ingenthron Apr 1, 2011