Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Feb 18, 2012
  1. @chiyoung @trondn

    Checkpoint maintains keys and subset of meta data fields only.

    chiyoung authored trondn committed
    The previous checkpoint implementation requires each checkpoint
    to maintain the list of keys, their values, and all of their
    meta data fields, which can cause very high memory overhead
    in case disk write throughput or replication is very slow.
    
    Based on various use cases for checkpoint, it turns out that it
    is not necessary to maintain the strong consistency across
    checkpoints. This can simplify a checkpoint's item structure,
    which allows us to have keys and subset of their meta data fields
    only. Basically, a checkpoint only contains the information about
    which keys have been mutated and their operation types.
    
    With this simplication, the memory overhead of a single checkpoint
    item (i.e., QueuedItem instance) is reduced from 88 bytes to 40
    bytes. In addition, the closed checkpoint won't point to stale
    Blob value instances anymore.
    
    Change-Id: I8c0273f582a53014ea92dd94ca9194cb9f5bc387
    Reviewed-on: http://review.couchbase.org/13286
    Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
Commits on Oct 27, 2011
  1. @mikewied

    When a key is mutated change the deleted field to false

    mikewied authored mikewied committed
    We want to do this because we only want to show that a key
    is in the deleted state if it doesn't exist in Couchbase.
    Lets say a key is being watched for multiple cas values
    and then that key gets deleted. We will record deleted
    on all of that key's observed cas values. If a user later
    sets a key in the database with the same key name then the
    deleted state will be cleared and replaced with mutated.
    
    Change-Id: I53337ba355d7196a6f7234b9990125e761af51eb
    Reviewed-on: http://review.couchbase.org/10374
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  2. @mikewied

    When a key is observed record its initial stat in the registry

    mikewied authored mikewied committed
    Change-Id: I424c45c140f3dd670dbb2f5dd0b84cb8af767e1b
    Reviewed-on: http://review.couchbase.org/10373
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  3. @mikewied

    Set initial replica value based on vbucket status

    mikewied authored mikewied committed
    active, pending = 0
    replica = -1
    
    Change-Id: I1df0aeedcd91597964851009e5ab95de7b5dfddb
    Reviewed-on: http://review.couchbase.org/10329
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  4. @mikewied

    Changed the way stats observe returns results

    mikewied authored mikewied committed
    We now comma seperate all values in order to keep the
    protocol consistent with the current stats command.
    
    For example:
    
    --> stats observe watchset1
    <-- key1 12 0 replicated,persisted
    
    becomes
    
    --> stats observe watchset1
    <-- key1,12 0,replicated,persisted
    
    Change-Id: I6cf0ac2e3b8819a38934992fa7ea0dfd4fd057ea
    Reviewed-on: http://review.couchbase.org/10327
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  5. @mikewied

    Observe registry now records errors in stats ep_observe_errors

    mikewied authored mikewied committed
    Change-Id: I623013a651f9cb9cbcbaf578ae75fa12aa93476f
    Reviewed-on: http://review.couchbase.org/10319
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  6. @mikewied

    Added error codes to observe registry functions

    mikewied authored mikewied committed
    Change-Id: I48b511c35753f1c920bea8b3419a77f1300ecaff
    Reviewed-on: http://review.couchbase.org/10318
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  7. @mikewied

    Observe sets now have a maximum size

    mikewied authored mikewied committed
    The maximum size of an observe set will by default only grow
    to watch 1000 key/cas pairs.
    
    Change-Id: I0e7d4a22e947b37fe19826fdfeded21b2799216b
    Reviewed-on: http://review.couchbase.org/10317
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  8. @mikewied

    Observe now checks vbucket state before insert/stats

    mikewied authored mikewied committed
    We now only return observed keys during stats calls when those
    keys are in buckets that are marked active. We also check to
    make sure that we don't keep track of keys in vbuckets that
    are marked DEAD on the server.
    
    Change-Id: I91b70fc00ee5166c155f778f47af9ca06a88ee77
    Reviewed-on: http://review.couchbase.org/10235
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
Commits on Oct 19, 2011
  1. @mikewied

    Added a dispatcher job for cleaning up observe sets.

    mikewied authored mikewied committed
    This job is run once per minute and will remove expired observe
    sets.
    
    Change-Id: Ia306aa7bbe1164739f9bf248d4fb8b6c3122b812
    Reviewed-on: http://review.couchbase.org/10181
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  2. @mikewied

    Observe sets can now time out

    mikewied authored mikewied committed
    Observe sets are now aware of when they were last touched and will
    time out if they have not been touched in the specified observe set
    expiration time.
    
    Change-Id: I7658298f2fdb4187d4a2b3b356cb5805d93f4246
    Reviewed-on: http://review.couchbase.org/10179
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  3. @mikewied

    Added a private function for adding observe sets.

    mikewied authored mikewied committed
    Change-Id: I321deef2d85531276966d76497e4c339aaf3b267
    Reviewed-on: http://review.couchbase.org/10200
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  4. @mikewied

    Added the ability to remove observe sets.

    mikewied authored mikewied committed
    Change-Id: I833d87643b5c27dbb29a69efcc40f04b298da605
    Reviewed-on: http://review.couchbase.org/10178
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  5. @mikewied

    Added stats for the observe command

    mikewied authored mikewied committed
    - How many observe sets are there?
    (ep_total_observe_sets)
    
    - How many polls have been made for stats observe?
    (ep_stats_observe_polls)
    
    - How many polls have been made for observe?
    (ep_observe_calls)
    
    - How many polls have been made for unobserve?
    (ep_unobserve_calls)
    
    - How many items across all observe sets?
    (ep_observe_registry_size)
    
    - How many errors on observe (trying to observe when not enough space)?
    (ep_observe_errors)
    
    Change-Id: I1043955ee044665b193455d89a8c519ecec8ad61
    Reviewed-on: http://review.couchbase.org/10144
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
Commits on Oct 18, 2011
  1. @trondn @dustin

    Fix build breaks due to illegal source code..

    trondn authored dustin committed
    According to the C and C++ standard all source files should end with a newline
    (ehh.. not be empty, but a source line should end with a newline)
    
    Change-Id: I6cfd1b8977904b4519b6c55531c8b2d6842f24fb
    Reviewed-on: http://review.couchbase.org/10194
    Tested-by: Trond Norbye <trond.norbye@gmail.com>
    Reviewed-by: Dustin Sallings <dustin@spy.net>
  2. @mikewied

    Added callbacks to observe table

    mikewied authored mikewied committed
    This commit adds callbacks to the observe table and allows it
    to correctly update key/value pairs based on events that take
    places in the server.
    
    Change-Id: I427d379bfa2918277999c391b598d0399fe1210d
    Reviewed-on: http://review.couchbase.org/10109
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
  3. @mikewied

    Implement the observe registry

    mikewied authored mikewied committed
    This the implementation of the basic observe registry. This
    code makes it possible for the observe and unobserve commands
    to store keys into Couchbase. This code does not include the
    ability for observe commands to be cleaned up or callbacks that
    will change the statistics for each key that is being observed.
    Those changes will come in future commits.
    
    Change-Id: I25502bed66afcd5eaa7f5da465805abf1a2b8938
    Reviewed-on: http://review.couchbase.org/9957
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Tested-by: Michael Wiederhold <mike@couchbase.com>
Something went wrong with that request. Please try again.