Permalink
Commits on Sep 11, 2014
  1. Merge pull request #156 from cloudant/34360-teach-fabric-get_db-about…

    …-maintenance-mode
    
    Teach fabric_util:get_db/2 about maintenance mode
    mikewallace1979 committed Sep 11, 2014
  2. Teach fabric_util:get_db/2 about maintenance mode

    This commit is a backport of:
    
     - 88ff6d323f904425f5130a237ce712b68ac70dfb
    
    From:
    
     - https://git-wip-us.apache.org/repos/asf/couchdb-fabric.git
    
    BugzID: 34360
    
    If the node servicing a request does not have a shard for the db
    involved then fabric_util:get_db/2 can return a shard from a node
    which is in maintenance mode. If that node is a replacement node
    that has not yet been brought into the cluster then the security
    object will be empty.
    
    Because fabric:get_security/2 calls fabric_util:get_db/2 and is in
    the code path for authorizing requests at the HTTP layer, this can
    result in live nodes returning 403s.
    
    This commit replaces an rpc:call/4 with a rexi:cast/4 and adds
    a new rpc endpoint in fabric_rpc for opening single shards. This
    uses set_io_priority which will reply with a rexi_EXIT if
    maintenance mode is set.
    
    Closes COUCHDB-2325
    mikewallace1979 committed Sep 10, 2014
Commits on Aug 12, 2014
  1. Merge pull request #141 from cloudant/27061-merge-couchdb-data-size

    Report new data size entries in info blobs
    davisp committed Aug 12, 2014
  2. Report new data size entries in info blobs

    This consolidates all of the file size information under a single key in
    the info JSON. The previous entries for disk_size and data_size are left
    untouched for backwards compatibility.
    
    BugzId: 27061
    davisp committed Jan 29, 2014
Commits on Jul 19, 2014
  1. Merge pull request #144 from cloudant/16742-couch-stats

    Replace margaret with couch_stats
    sagelywizard committed Jul 19, 2014
Commits on Jul 15, 2014
  1. Add meck directives for couch_stats to eunit tests

    BugzID: 16742
    banjiewen committed with sagelywizard Feb 5, 2014
  2. Replace calls to margaret with calls to couch_stats

    Also add a stats_description.cfg file.
    
    BugzID: 16742
    banjiewen committed with sagelywizard Feb 4, 2014
Commits on Jun 16, 2014
  1. Merge pull request #152 from cloudant/31725-since-now

    Support since=now
    rnewson committed Jun 16, 2014
  2. Support since=now

    BugzID: 31725
    rnewson committed Jun 16, 2014
Commits on May 28, 2014
  1. Merge pull request #148 from cloudant/26984-log-fabric-timeouts

    Consistently log fabric worker timeouts
    mikewallace1979 committed May 28, 2014
  2. Consistently log fabric worker timeouts

    Write a log line for each worker that did not return a response
    when a fabric request times out. The format of the log line is:
    
        fabric_worker_timeout ENDPOINT,NODE,SHARD_NAME
    
    This is intented to be easily consumable by downstream tools
    (e.g., Splunk).
    
    BugzID: 26984
    mikewallace1979 committed Jan 11, 2014
Commits on May 20, 2014
  1. Merge pull request #149 from cloudant/28992-fix-get-shard-replacements

    Clear worker references for get_shard_replacements
    rnewson committed May 20, 2014
Commits on Mar 13, 2014
  1. Merge pull request #150 from cloudant/28847-set_security-ignore-mm

    Set non-interactive default for set_security
    sagelywizard committed Mar 13, 2014
  2. Set non-interactive default for set_security

    Prior to this commit, fabric:set_security would default to interactive
    IO priority. This would cause all nodes to set the security header
    except shards on any nodes which were in MM. Subsequent calls to
    fabric:get_security would cause inconsistent security properties to be
    applied to the request. This patch sets a non-interactive default for
    fabric:set_security, which will cause security updates to be applied to
    all nodes regardless of MM by default.
    
    BugzID: 28847
    sagelywizard committed Mar 13, 2014
Commits on Mar 12, 2014
  1. Clear worker references for get_shard_replacements

    This function relies on record equality. If a request passes workers
    that have references defined it would return all copies of the shard
    range incorrectly.
    
    BugzId: 28992
    davisp committed Mar 12, 2014
Commits on Feb 18, 2014
  1. Merge pull request #147 from cloudant/28181-view-ordering

    Use couch_view:less_json_ids when comparing view row ids
    rnewson committed Feb 18, 2014
  2. Use couch_view:less_json_ids when comparing view row ids

    Fix by @davisp, githubbery by @rnewson.
    
    BugzID: 28181
    Robert Newson committed Feb 18, 2014
Commits on Feb 12, 2014
  1. Merge pull request #134 from cloudant/24518-attachment-metadata

    Move attachment code into couch_att
    Brian Mitchell committed Feb 12, 2014
Commits on Jan 31, 2014
  1. Merge pull request #143 from cloudant/27660-fix-db-listener-upgrades

    Fix fabric_db_update_listener code upgrades
    davisp committed Jan 31, 2014
  2. Fix fabric_db_update_listener code upgrades

    Changes procesess waiting idle for db update messages will never upgrade
    their code. This just adds a timeout before recursing through the module
    exports table to load new code.
    
    BugzId: 27660
    davisp committed Jan 31, 2014
Commits on Jan 30, 2014
  1. Merge pull request #142 from cloudant/27483-check-io-priority-earlier

    Call set_io_priority/2 before fetching design documents
    banjiewen committed Jan 30, 2014
  2. Call set_io_priority/2 before fetching design documents

    This change causes nodes that are in maintenance mode to drop view
    requests earlier than they would otherwise. Without it, calls to
    ddoc_cache:open_doc/3 are being made on nodes that are in maintenance
    mode, with what appears to be undesirable results.
    
    BugzID: 27483
    banjiewen committed Jan 29, 2014
Commits on Jan 24, 2014
  1. Merge pull request #140 from cloudant/27193-changes-rewind-owner-check

    Include epoch node in seqs and replacement logic
    kocolosk committed Jan 24, 2014
  2. Include epoch node in seqs and replacement logic

    The {Seq, UUID, Node} triplet uniquely identifies an update in a
    cluster.  Including the node that originally accepted the update in
    sequences allows us to defend against byzantine cases of shards moving
    back and forth between the nodes in a cluster.
    
    This patch updates the sequence generation to include the full triplet
    in each element of the _changes sequence.  It also uses the epoch node
    instead of the node currently hosting the shard when determining the
    safe replacement sequence.
    
    BugzID: 27193
    kocolosk committed Jan 17, 2014
Commits on Jan 6, 2014
  1. Move attachment code into couch_att

    This is an attempt to isolate the attachment record and
    some related code. This will allow seamless upgrades
    over time.
    Brian Mitchell committed with Brian Mitchell Dec 12, 2013
  2. Avoid badarith error during cluster upgrade

    BugzID: 26631
    kocolosk committed Jan 6, 2014
Commits on Jan 2, 2014
  1. Merge pull request #139 from cloudant/25944-changes-descending-mm

    Make _changes?descending=true aware of maint. mode
    
    BugzID: 25944
    kocolosk committed Jan 2, 2014
  2. Make _changes?descending=true aware of maint. mode

    The _changes coordinator was using a one-off thing to get the start
    sequence for a database which did not provide any error handling at all.
    This patch replaces that one-off with a call to get_db_info/1, which
    does include all the normal error handling.
    
    A future enhancement could teach the coordinator to understand a
    "sequence" like eof that would cause all the workers to automatically
    seek to the end, but I wanted to stay conservative here in order to land
    this for the next release.
    
    BugzID: 25944
    kocolosk committed Jan 2, 2014
Commits on Dec 13, 2013
  1. Merge pull request #138 from cloudant/26162-fix-all-docs-error-logging

    Fix logging of errors in _all_docs open_doc calls
    davisp committed Dec 13, 2013
  2. Fix logging of errors in _all_docs open_doc calls

    Our exception handling accidentally captured the successful return
    value. Using try/of/catch we can exit from the of clause without
    catching.
    
    BugzId: 26162
    davisp committed Dec 13, 2013
Commits on Dec 12, 2013
  1. Merge pull request #136 from cloudant/26124-check-replacements-exist

    Only attempt replacement when we have replacements
    davisp committed Dec 12, 2013
  2. Merge pull request #135 from cloudant/26122-fix-changes-stream-start-…

    …errors
    
    Throw errors when starting changes streams
    davisp committed Dec 12, 2013
  3. Merge pull request #137 from cloudant/26125-fix-changes-replacement-l…

    …og-bug
    
    Don't attempt to replace replacement shards
    davisp committed Dec 12, 2013
  4. Don't attempt to replace replacement shards

    The old test was looking for {_, _} tuple but that doesn't account for
    old since sequences. This just switches to using a negative selection.
    The only bad behavior was that we were making lots of log messages about
    rewinding from 0 in known conditions.
    
    BugzId: 26125
    davisp committed Dec 12, 2013
  5. Only attempt replacement when we have replacements

    We weren't checking if we were even provided replacements before using
    them. This just adds a guard so we don't end up with a badmatch error on
    the `lists:keytake/3`.
    
    BugzId: 26124
    davisp committed Dec 12, 2013