Permalink
Commits on Feb 4, 2014
  1. enforce port 8092 requests to use lhttpc_manager's connections

    Change-Id: I2c1b1209e39a7bae8e24194c03fd74bb82e153d7
    Reviewed-on: http://review.couchbase.org/32898
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Steve Yen <steve.yen@gmail.com>
    Aliaksey Kandratsenka committed with alk Jan 28, 2014
Commits on Dec 3, 2013
  1. bp MB-9612: handling remote_cluster_info error more gracefully

    This is a backport for a fix merged in 2.5. Original commit is:
    
    http://review.couchbase.org/#/c/30650/
    
    Change-Id: Iad81f2cc53d71e55ce1a69856099f6031546bba1
    Reviewed-on: http://review.couchbase.org/30804
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Junyi Xie committed with alk Dec 3, 2013
Commits on Nov 26, 2013
  1. Merge remote-tracking branch 'gerrit/2.2.0' into CBSE-811

    * gerrit/2.2.0:
      CBSE-811:  empty commit to force gerrit/github sync
      bp:MB-9422 Fix recovery map generation.
      bp:MB-9209: fix unbounded worker stats dictionary
      bp MB-9209: hibernate XMEM processes
      MB-9140: сorrected link to contacts
      MB-9073 Always set type to xmem when creating a replication.
    
    Change-Id: Iff0f7ea2123677b2ce8e8bb831f67366958c4148
    Aliaksey Kandratsenka committed Nov 26, 2013
  2. Merge "CBSE-811: empty commit to force gerrit/github sync" into 2.2.0

    Phil Labee committed with Gerrit Code Review Nov 26, 2013
  3. CBSE-811: empty commit to force gerrit/github sync

    Change-Id: I123155a5eea581590fb3b57b90e4b72bd0a033d2
    Phil Labee committed Nov 26, 2013
Commits on Nov 25, 2013
  1. bp:MB-9422 Fix recovery map generation.

    Here's what recovery map generation code supposed to do:
    
     1. Figure out which nodes have more vbuckets than they would have
     if vbuckets were equally distributed.
    
     2. Distribute missing vbuckets among the underutilized nodes so that
     these nodes have more or less equal number of vbuckets.
    
    Unfortunately the code was flawed. It assumed that it's never possible
    to "run out" of missing vbuckets and that, basically, every node will
    get at least some subset of them. Which is of course not true.
    
    I removed the part that determined under/overutilized nodes and just
    assume that since rebalance will be needed anyway, it's enough to just
    not put on each node more vbuckets than it would have if the vbucket
    map was balanced. I also replaced the call to lists:split to similar
    function misc:safe_split. The difference is that the latter doesn't
    crash if the list to split is larger than the split index.
    
    I also added a test to verify for different input parameters recovery
    map can be generated and that it assign every of the missing vbuckets
    to some node.
    
    Orig-Reviewed-on: http://review.couchbase.org/29769
    
    Conflicts:
    	src/misc.erl
    
    Change-Id: Iab844794aaf6299e5e2f6280c9e083264021e2ee
    Reviewed-on: http://review.couchbase.org/30550
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Aliaksey Kandratsenka committed with alk Nov 5, 2013
  2. bp:MB-9209: fix unbounded worker stats dictionary

    We incorrectly used {<pid>, <unique ref>} from worker processes as
    the key used to store worker stats in the vb replicator state. The
    problem is each time a worker returns a different <unique ref> that
    causes a new entry is created when worker reports stats to the vb
    replicator. Overtime, the stats table will increase unboundedly,
    causing memory leak. This fix uses a unique worker id to identify
    each worker process and use that id as the key of worker stats table.
    Thus the number of entries of vb stats table will be bounded by the
    number of worker processes (default is 4).
    
    Change-Id: I4c02fba251e234918c3d1b96931d0cc1acf6e4d5
    Orig-Change-Id: Iac9461cb2ddad37e6ee0edce4ef7d87e0ceef1e3
    Orig-Reviewed-on: http://review.couchbase.org/29907
    Reviewed-on: http://review.couchbase.org/30549
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Junyi Xie committed with alk Oct 30, 2013
  3. bp MB-9209: hibernate XMEM processes

    This is a backport to 2.2 of Alk's fix merged to 2.5
    The original fix is at:
        http://review.couchbase.org/#/c/30359/2
    
    Change-Id: I5b71695e9e6f9085e42d20f810de41d17718e92e
    Reviewed-on: http://review.couchbase.org/30528
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Junyi Xie committed with alk Nov 24, 2013
Commits on Sep 26, 2013
  1. MB-9140: сorrected link to contacts

    Change-Id: I48901a6cc2dbbbfaf10be19eb12ac88e24c13893
    Reviewed-on: http://review.couchbase.org/29169
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    pavel-blagodov committed with alk Sep 24, 2013
Commits on Sep 6, 2013
  1. MB-9073 Always set type to xmem when creating a replication.

    Also ensure that advanced settings container is always folded by
    default.
    
    Change-Id: I9cdde5c0144b203bd3b49f33969494261958ed29
    Reviewed-on: http://review.couchbase.org/28834
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Sep 6, 2013
Commits on Sep 4, 2013
  1. MB-9062: always send set-with-meta options

    So that we can be sure we're speaking to 2.1.0+ node which understands
    those and most importantly is doing xdcr-style conflict resolution.
    
    Otherwise it's possible for xmem replication to replicate to 2.0.1
    nodes thinking that conflict resolution happens automagically on the
    other side when it's not the case.
    
    Change-Id: I1e15d89932bab8bbcbee933220ae4e08e15e052e
    Reviewed-on: http://review.couchbase.org/28799
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Aliaksey Kandratsenka committed with alk Sep 4, 2013
Commits on Aug 30, 2013
  1. MB-9007: use different variables for RemoteBucket

    When vb replicator inits, it call remote_cluster_info multiple
    times to fetch the remote bucket and remote vbucket info. In
    particular we call remote_clusters_info:get_remote_bucket_by_ref()
    to get the remote_bucket, and get_memcached_vbucket_info_by_ref()
    to get ip, port and remote_bucket. However, in some cases the
    remote_bucket returned by these two functions may not be exactly
    the same if it is updated between the two calls, causing badmatch
    Erlang error when vb replicator initializes.
    
    The fix is simple, we just use different variables for the
    remote_bucket returned by these two calls.
    
    Change-Id: If44f7124059bea85aade2051e619371aa93fbc91
    Reviewed-on: http://review.couchbase.org/28687
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Junyi Xie committed Aug 30, 2013
Commits on Aug 28, 2013
  1. MB-8974 suppress unnecessary error messages in cbreset_password

    - do not display failed attempts to read initargs if one of the
      attempts succeeded
    - suppress confusing stderr output from erl shell script on mac
    
    Change-Id: Ibe75411caddb21e209734345ee246a9a85764541
    Reviewed-on: http://review.couchbase.org/28606
    Tested-by: Artem Stemkovski <artem@couchbase.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    vzasade committed with aartamonau Aug 27, 2013
Commits on Aug 27, 2013
  1. MB-8815 Fix RO user access to auth_any_bucket endpoints.

    This didn't work if there were no buckets defined.
    
    Change-Id: I0693715c3a92d3f97e8c135265fdb056796236fc
    Reviewed-on: http://review.couchbase.org/28605
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Aug 27, 2013
  2. MB-100 Make menelaus_ui_auth ets tables protected.

    For easier debugging.
    
    Change-Id: I0a92fa424c0f057c7eefb5e06b791aad1dbcd870
    Reviewed-on: http://review.couchbase.org/28604
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Aug 27, 2013
  3. MB-100: make xmem error logs more user-friendly

    QE mentioned it is not clear how to read the XMem stat in the
    "XDCR errors" on UI. This commit will explain these stats to
    make it more use-friendly. E.g, if xmem worker crashed due to
    remote memcached errors, we will see something like this on UI:
    
    "xmem stats: in batch of 500 docs: flushed: 460, rejected
    (eexists): 10; remote memcached errors: enoent: 20, not-my-vb: 5,
    invalid: 0, timeout: 5, others: 0."
    
    Change-Id: I3d42832a589a21c5c072819516eeaec68b3f4d30
    Reviewed-on: http://review.couchbase.org/28579
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Artem Stemkovski <artem@couchbase.com>
    Junyi Xie committed with vzasade Aug 26, 2013
Commits on Aug 26, 2013
  1. MB-8966: correctly fetch global settings for XDCR UI

    Previous code fetched global settings even before current replication
    setting url is set.
    
    Correct behavior is making sure we fetch both global and
    per-replication settings every time we are refreshing it.
    
    Change-Id: I02a715761bc0f9a4a8a42815c0f8befc454e3d9f
    Reviewed-on: http://review.couchbase.org/28585
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Aliaksey Kandratsenka committed with aartamonau Aug 26, 2013
  2. MB-8663 Mention where to find replication id.

    Change-Id: I1902d5d04ee6ab020c7df491b86b3c9889e64da3
    Reviewed-on: http://review.couchbase.org/28584
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Aug 26, 2013
  3. MB-100: use rep_details to check replication mode

    Today in vb replicator we use xmem_srv process to check the mode
    of replication, which is correct in most cases except that if it
    crashed, the terminate function of vb replicator will not be able
    to know which mode the vb replicator is using. Actually we have
    already encoded replication mode info in rep_details, thus we
    should use it instead of relying on xmem_srv process.
    
    Change-Id: I22816e3cea5f478f699cd47940a67688d76114e5
    Reviewed-on: http://review.couchbase.org/28561
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Junyi Xie committed with alk Aug 25, 2013
  4. MB-8958: identify 2.2.0 "for xdcr" bucket list requests

    In future we might plan to evolve bucket details response to remove
    saslPassword field particularly. But that field is used by xdcr (xmem
    mode). In order to be able to remove that field without breaking xdcr
    backwards compatibility we'll start passing unused http query option.
    So that future version can identify 2.2.0 requests and send it
    saslPassword field as expected.
    
    Change-Id: I0eddfef807310a2066348a97f5b3a3da785b2a5d
    Reviewed-on: http://review.couchbase.org/28540
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Aliaksey Kandratsenka committed with aartamonau Aug 23, 2013
  5. MB-100 Don't crash if Min of Max is not an integer.

    The can also be an atom infinity.
    
    Change-Id: I734c6fa6bf1c646651211bb85214a98ae9130162
    Reviewed-on: http://review.couchbase.org/28551
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Aug 24, 2013
  6. MB-8909 make errors for bucket password beautyful

    without hardcoding width in html
    
    Change-Id: I14a72cdd9d06a1edd3fbc4d4de53cd5f6e2fb4bb
    Reviewed-on: http://review.couchbase.org/28541
    Tested-by: Artem Stemkovski <artem@couchbase.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    vzasade committed with alk Aug 23, 2013
Commits on Aug 24, 2013
  1. MB-8663 Add an entry to CHANGES file about XDCR settings.

    Change-Id: I77ba4992a6febb7db23eb1cf172a8acefb5e6d37
    Reviewed-on: http://review.couchbase.org/28552
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Aug 24, 2013
Commits on Aug 23, 2013
  1. MB-100: fix XDCR dialyzer error

    Change-Id: I2c8c3a2e40573d0a611cf037459ff044c9c2c292
    Reviewed-on: http://review.couchbase.org/28544
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Junyi Xie committed Aug 23, 2013
  2. MB-100: fix unreaable XDCR trace

    The original trace was modified in recent commits but the
    XMem remote info is dumped incorrectly and unreadable. This
    commit will create a readable string for XMmem remmote. E.g,
    
    (target node: 10.3.121.123:11210, target bucket: default)
    
    Change-Id: Ie16792077100ebc96206bbc4449fe9c9858b3bfa
    Reviewed-on: http://review.couchbase.org/28537
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Artem Stemkovski <artem@couchbase.com>
    Junyi Xie committed with vzasade Aug 23, 2013
  3. MB-8909: make errors for bucket password visible

    Change-Id: Ie5d476ff96c7c3e403d72884ab888f5004e6372f
    [alk@tut.by: prettified error message look a bit]
    Signed-off-by: Aliaksey Kandratsenka <alk@tut.by>
    Reviewed-on: http://review.couchbase.org/28526
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Aug 23, 2013
  4. MB-8909 Disallow spaces and control characters in bucket passwords.

    Change-Id: Ie95a8e02c8955a0c385f201a9b797648a071d5c6
    Reviewed-on: http://review.couchbase.org/28524
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed Aug 22, 2013
  5. MB-8887 Handle old nodes when building basic stats.

    Change-Id: Ic22c118924e3ae6d1f398e6c731e593fcc5ddf09
    Reviewed-on: http://review.couchbase.org/28525
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    aartamonau committed with alk Aug 23, 2013
  6. MB-8930: avoid crash replicator when timeout in getMeta

    It is hard to expect when remote memcached will return the key
    metadta that source XMem requests. Today we crash replicators if
    the getMeta() to remote timed out or source receives some unexpected
    memcached errors. A better behavior is that we send doc to remote
    optimistically if we are unable to fetch the metadata from remote
    memcached. The del/setWithMeta at remote cluster will do resolution
    for us.
    
    Also, we make separate stat for timeout from other errors.
    
    Change-Id: Idddc07e287a5d56a4410af10c56b81fa39daf800
    Reviewed-on: http://review.couchbase.org/28483
    Reviewed-by: Artem Stemkovski <artem@couchbase.com>
    Tested-by: Artem Stemkovski <artem@couchbase.com>
    Junyi Xie committed with vzasade Aug 22, 2013
  7. MB-8911: CAPI side resolution algorithm change for deletion

    Since 2.2, ep_engine changes the resolution algorithm for deletion.
    To be consistent, CAPI mode replication should also adopt the same
    algorithm.
    
    Actually ep_engine will do their resolution in deleteWithMeta(),
    here we put another defense line (the second getMeta before writing
    doc locally) in CAPI just for safety and performance reasons.
    
    Change-Id: I008e41b7dced21ee76e0b1e71bfd0d68b6f972d1
    Reviewed-on: http://review.couchbase.org/28446
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Artem Stemkovski <artem@couchbase.com>
    Junyi Xie committed with vzasade Aug 21, 2013
Commits on Aug 22, 2013
  1. MB-8150 disallow certain ports for cluster and bucket init

    - default epmd port (4369)
    - ports from erlang kernel port range
    - current rest api port (for buckets)
    - moxi port
    - 2 memcached ports : mccouch_port, dedicated_port, port
    - capi port
    - any of the existing buckets ports
    
    the fix is made with the assumption that we have one
    node per box.
    
    Change-Id: I5d58ad1c45bc732458cd6bea551b0be0190bb3ad
    Reviewed-on: http://review.couchbase.org/28462
    Reviewed-by: Artem Stemkovski <artem@couchbase.com>
    Tested-by: Artem Stemkovski <artem@couchbase.com>
    vzasade committed Aug 22, 2013
  2. MB-8905: modify resolution algorithm for deletion in XMEM

    The fix of MB-8825 at ep_engine side modified the resolution
    algorithm for deletion, that is, we only compare Seqno and CAS
    for del mutation in delWithMeta(). Because XDCR provides an
    option to do local conflict resolution for backward compati-
    bility, we also need to change the XDCR side conflict resolution
    algorithm accordingly, to be consistent with ep_engine side
    change.  The bottom line is, resolution algorithm should be the
    same regardless of the location where we do conflict resolution.
    
    Change-Id: I0a107b743b3b5b4f0ed9889c279ab0ebe1fa9c23
    Reviewed-on: http://review.couchbase.org/28405
    Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Junyi Xie committed Aug 20, 2013
  3. MB-8937: fix internal setting of "xdcrOptimisticReplicationThreshold"

    For parameter "xdcrOptimisticReplicationThreshold", the default value
    is 256, and it should show up in internal settings.
    
    Change-Id: Ib379a6dbbe1dec890b9ab9b7feff22ca73685c43
    Reviewed-on: http://review.couchbase.org/28480
    Tested-by: Junyi Xie <junyi.couchbase@gmail.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Junyi Xie committed with aartamonau Aug 22, 2013
  4. MB-8801 some documantation a fixed typo

    Change-Id: I094624a0dbe6165979fcf4a961d96e3605604493
    Reviewed-on: http://review.couchbase.org/28460
    Tested-by: Artem Stemkovski <artem@couchbase.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    vzasade committed with aartamonau Aug 21, 2013
Commits on Aug 21, 2013
  1. MB-8460 kill leftover _replicator database

    - we assume that if the cluster is not provisioned
      and _replicator database exists and contains more
      than 0 records, then this database is a leftover
      from some previous installation that had the same
      directory setup for its data files.
    - to prevent crashes in xdcr and orphan replication
      to be displayed in the UI we need to delete such
      database
    - this code is executed from xdc_rep_manager:init
      since xdc_rep_manager preceeds xdc_rdoc_replication_srv
      in the supervisor spec
    - xdc_rdoc_replication_srv now assumes that correct _replicator
      database is created by xdc_rep_manager and will
      not try to create it itself
    
    Change-Id: I7dd8c7b7fa70c0a74a0bdc8d8c2128595ef7e0be
    Reviewed-on: http://review.couchbase.org/28423
    Tested-by: Artem Stemkovski <artem@couchbase.com>
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com>
    vzasade committed with Junyi Xie Aug 21, 2013