Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 19, 2012
  1. @Damienkatz

    Fix for occasional eacces error on windows.

    Damienkatz authored
    For reasons unknown, opening a file on windows sometimes returns
    {error, eacces}. Fix by retrying open for a maximum of 10 seconds.
    Max retry time now also applies to emfile errors.
    
    Change-Id: I915416a2512def52ecbc615c058deff7e630922f
    Reviewed-on: http://review.couchbase.org/14085
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
Commits on Mar 15, 2012
  1. @alk

    don't die enabling snapshot reads in terminate

    alk authored alk committed
    Exception from terminate will replace exit reason of gen_server. So
    we'll lose important piece of information if that happens.
    
    So in order to keep original reason we should just log and swallow
    problems in terminate.
    
    Change-Id: I7e8071cd795d97fe5401f837f967a1e20cd7c1fd
    Reviewed-on: http://review.couchbase.org/13973
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  2. @alk

    message about switching files in compaction deserves LOG_INFO

    alk authored alk committed
    Change-Id: Iabd05c3ce715f8b47ed44b375946048d393f759a
    Reviewed-on: http://review.couchbase.org/13975
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  3. @alk

    implemented better diagnostics for writer_loop fd reopen problems

    alk authored alk committed
    Instead of badarg we'll hopefully have much better diagnostics now.
    
    Change-Id: I852b57c386bd15120dd6c959dcf9f40c6e09fe48
    Reviewed-on: http://review.couchbase.org/13974
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Mar 1, 2012
  1. @fdmanana

    Better updater's doc loader error reporting

    fdmanana authored fdmanana committed
    Change-Id: I38ec2d733796eb599e779dbf10151e208cef8be2
    Reviewed-on: http://review.couchbase.org/13720
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/13742
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. @fdmanana

    Separate barriers for main and active index updates

    fdmanana authored fdmanana committed
    Replica index updates can prevent main index updates from
    running sooner, causing clients to wait for a very long
    time to get responses to view queries. Therefore use a
    separate, and smaller, pool for replica index updaters.
    
    This relates to MB-4848.
    
    Change-Id: If356994fc35ac24e5b09199b18304244ca7af777
    Reviewed-on: http://review.couchbase.org/13704
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/13741
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. @fdmanana @alk

    Include row origin node in map queries with ?debug=true

    fdmanana authored alk committed
    For map queries in debug mode, besides the partition ID,
    include the URL of the node from where each row comes.
    Example query response:
    
    {
      "rows": [
          {
             "value" : "doc_000031",
             "id" : "doc_000031",
             "node" : "local",
             "partition" : 31,
             "key" : 32
          },
          {
             "value" : "doc_000032",
             "id" : "doc_000032",
             "node" : "http://10.17.4.149:9501/_view_merge/",
             "partition" : 32,
             "key" : 32
          },
          (....)
      ]
    }
    
    Change-Id: I7ec9c5f93e1984a49844bb0146bcf161ad937eb9
    Reviewed-on: http://review.couchbase.org/13621
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/13703
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  4. @alk @fdmanana

    fixed make check

    alk authored fdmanana committed
    Change-Id: I26fb6f0e0f90b8c5f49560fc4fe4fe4ef1cdf89b
    Reviewed-on: http://review.couchbase.org/13701
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
  5. @fdmanana @alk

    Remove unnecessary lists:flatten/1 call

    fdmanana authored alk committed
    Change-Id: I37cedea83c1cb04ed68e1f6c4ce5ada9228a802d
    Reviewed-on: http://review.couchbase.org/13686
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/13697
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  6. @fdmanana @alk

    Improve set view indexer performance

    fdmanana authored alk committed
    Instead of having the mapper queue item by item, let
    it queue all the items at once. This reduces messaging
    with the work queue, reducing the time the mapper gets
    blocked waiting the response to gen_server synchronous
    calls.
    A quick test showed that an index build time decreased
    from 4 minutes to 3 minutes and 22 seconds (repeated the
    test several times and reached the same results on a
    machine with an ssd disk).
    
    Change-Id: I6b2546e51df2ed6c467e584f4188d70eb2449a2b
    Reviewed-on: http://review.couchbase.org/13632
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/13695
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  7. @fdmanana @alk

    Avoid function_clause error for queries with ?debug=true

    fdmanana authored alk committed
    When merging the results of the local main and replica indexes
    and the query has ?debug=true, the merge would fail with a
    function_clause error. The solution is just to ignore debug
    information in the callback used by the view merger.
    We're only interested in the debug information from the view
    merging step done at a higher level (multiple nodes, triggered
    by ns_server).
    
    Change-Id: I16778154a415b39ce308cbdb5cf7b401da8f66ca
    Reviewed-on: http://review.couchbase.org/13677
    Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-on: http://review.couchbase.org/13696
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  8. @fdmanana @alk

    Unblock cleanup waiters when updater finishes normally

    fdmanana authored alk committed
    If the updater is not interrupted and finishes normally,
    unblock cleanup waiters if any.
    
    Issue observed in MB-4850.
    
    Change-Id: I141292af72f6960c8680dcc3462029ce71cf7e28
    Reviewed-on: http://review.couchbase.org/13694
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Feb 22, 2012
  1. @bcui6611

    Disable btree native implementation on windows

    bcui6611 authored
    Change-Id: If6be6d9155b4972e88448ce44a619562582fba2b
    Reviewed-on: http://review.couchbase.org/13487
    Tested-by: Bin Cui <bin.cui@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
  2. @fdmanana

    Include stack traces in updater error messages

    fdmanana authored fdmanana committed
    Change-Id: Id307c9f8ec5d8b9a379015785ce63335ce31efaa
    Reviewed-on: http://review.couchbase.org/13478
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. @fdmanana

    Avoid unnecessary JSON encoding/decoding of doc bodies

    fdmanana authored fdmanana committed
    The bodies are already raw JSON strings, therefore don't
    decode and encode them before sending them to the view
    server.
    
    Change-Id: I8cd099380d2adc55ff91cbce7fa55a94ec1efe2a
    Reviewed-on: http://review.couchbase.org/13476
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 21, 2012
  1. @fdmanana

    Fix incrementing of dead view fd ref counters

    fdmanana authored fdmanana committed
    If compaction finishes while the updater is running, we shutdown the
    currently running updater, create a new view fd ref counter and then
    start another updater with the old fd ref counter, which is being
    dropped right after. This made subsequent fd ref counter increments
    fail when the new updater finished.
    
    This fixes MB-4808.
    
    Change-Id: I939e3c01af47bf59fe7ac46c83e1e43711979240
    Reviewed-on: http://review.couchbase.org/13451
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. @fdmanana

    Don't shutdown db ref counter on delete

    fdmanana authored fdmanana committed
    This allows clients to be able to still read from the database
    after is was deleted if they opened it before it got deleted.
    This doesn't prevent the database from being recreated however,
    ensuring the same behaviour as before.
    
    This relates to MB-4809.
    
    Change-Id: Idbefa68dad441c490101f2c280852e7cf35a2b7f
    Reviewed-on: http://review.couchbase.org/13422
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 20, 2012
  1. @fdmanana

    Don't ignore normal exit messages from unknown processes

    fdmanana authored fdmanana committed
    This can lead to important core database and view group
    errors that are being masked by these clauses.
    Further, at least the first one is redundant as we don't
    expect the reader or writer processes to exit at any time
    with a normal reason.
    
    Change-Id: I6c81dbf4e4cbf14e3b1bd23c3fbc7f7169b6f9c0
    Reviewed-on: http://review.couchbase.org/13308
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. @fdmanana

    Fix propagation of startkey_docid/endkey_docid

    fdmanana authored fdmanana committed
    Unlike other view query parameters (key, keys, startkey,
    endkey, etc), these two parameters (startkey_docid and
    endkey_docid) must not be JSON encoded.
    
    Change-Id: Iebb8fcaf22578dd2c5abdb0de5711bd5909d713c
    Reviewed-on: http://review.couchbase.org/13376
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. @fdmanana

    Set call request_group_info timeout to infinity

    fdmanana authored fdmanana committed
    Some testrunner tests were getting a timeout error here often.
    This fixes it.
    
    Change-Id: I7705a04c7061d4d62de55c26b30577dfad141d82
    Reviewed-on: http://review.couchbase.org/13370
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  4. @fdmanana

    Fix fold reduce with pagination

    fdmanana authored fdmanana committed
    Paginated fold reduce, with inclusive_end=false and one
    of startkey_docid or endkey_docid was producing wrong
    reduce values.
    For views, it ignored completely the doc ID component of the
    keys.
    
    Change-Id: Ifd6796f251caef38acda8a218757865aea5c8004
    Reviewed-on: http://review.couchbase.org/13368
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  5. @fdmanana

    Avoid view group ref counter leak when supporting replicas

    fdmanana authored fdmanana committed
    This happens when the view group has replica support. The
    compaction requester increments the ref counters of the main
    and replica view groups, but never decrements them. Same issue
    happens on startup, where the main group requests the replica's
    group snapshot but never decrements the associated ref counter.
    This didn't affect view groups without replica support.
    
    Change-Id: Icd0aeb8e41cf301395607c5f51d2ec2ae5d862dc
    Reviewed-on: http://review.couchbase.org/13367
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 18, 2012
  1. @fdmanana

    Remove useless receive expression

    fdmanana authored fdmanana committed
    At this point, the compactor process is alive, because
    it's doing us a gen_server synchronous call.
    
    Change-Id: I6a00d361ab235d7b484ca3986d78ec32637a1b2f
    Reviewed-on: http://review.couchbase.org/13310
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. @fdmanana

    Remove unnecessary linking

    fdmanana authored fdmanana committed
    The compaction fd no longers needs to be linked to the
    compaction process because whenever the later is cancelled
    or dies, the view group shutdowns the compaction fd
    explicitly. Also make sure the view group is not linked to
    open files, the ref counters are already responsible for
    managing the files.
    Added monitoring of the file and ref counter to help debug
    MB-4808 as well.
    
    Change-Id: I2764f89b4b6de9b69ebaed4f86b3473bddb24d0a
    Reviewed-on: http://review.couchbase.org/13307
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. @fdmanana

    Remove redundant code in couch_set_view_group

    fdmanana authored fdmanana committed
    Change-Id: Ida9459ee00e93880b94b8cf44ceb7221c7e3a8d4
    Reviewed-on: http://review.couchbase.org/13306
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  4. @fdmanana

    Better couch_db_set/couch_set_view_group logging on exit

    fdmanana authored fdmanana committed
    Change-Id: I357ad7abe0929c32f01e6aae7aa645b3df74f916
    Reviewed-on: http://review.couchbase.org/13304
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  5. @aartamonau @alk

    MB-4800 Handle view queries with limit=0.

    aartamonau authored alk committed
    Change-Id: I49ea3e381a5ce352103442a2fc38014f309980c1
    Reviewed-on: http://review.couchbase.org/13346
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Commits on Feb 16, 2012
  1. @aartamonau @fdmanana

    MB-4811 Unlink all the folders before killing any of them.

    aartamonau authored fdmanana committed
    Since recently all the folders became linked to a merger queue. Thus
    killing any of them causes also queue death. And this death is
    propagated to all other folders. And depending on if those other
    folders has already been unlinked or not the EXIT message would or
    would not be delivered to the main process. And hence when such EXIT
    message is delivered to the main process, it's interpreted as an
    error.
    
    Change-Id: If69ed31d40613416fcdf3a82df6bf7e5d0dd608a
    Reviewed-on: http://review.couchbase.org/13284
    Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 15, 2012
  1. @fdmanana

    Add update_errors stat to query debug info

    fdmanana authored fdmanana committed
    Change-Id: I596a2845caaf02c2c655a9770b6b5e739ee2f2f9
    Reviewed-on: http://review.couchbase.org/13258
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  2. @fdmanana

    Removed duplicated code

    fdmanana authored fdmanana committed
    Change-Id: I9b4f14d5100097f6338632575e01e982e7aff3db
    Reviewed-on: http://review.couchbase.org/13257
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  3. @fdmanana

    Better error handling/message for builtin _stats reduce

    fdmanana authored fdmanana committed
    Relates to MB-4801.
    
    Change-Id: Ie3ace22575e80744b87951f73d8b772361a77e07
    Reviewed-on: http://review.couchbase.org/13253
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 14, 2012
  1. @fdmanana

    Fix map view queries with ?include_docs=true

    fdmanana authored fdmanana committed
    The test view_merge.py was not detecting the error.
    Remember: verify the length of the rows array received.
    
    Change-Id: Ibda7b07411b1366d2a2c74f7bbd8b3093c0ff80c
    Reviewed-on: http://review.couchbase.org/13202
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 13, 2012
  1. @fdmanana

    Fix indexing of same key originating from different docs

    fdmanana authored fdmanana committed
    Fixes MB-4793.
    
    Change-Id: Ie75427914c91f08e065f40876d9f66e5287ca0be
    Reviewed-on: http://review.couchbase.org/13193
    Reviewed-by: Damien Katz <damien@couchbase.com>
    Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Commits on Feb 10, 2012
  1. @alk

    use -jN support of prove only if supported

    alk authored alk committed
    Change-Id: I4e232209a90dfea92d9741ebcfad438625d5b204
    Reviewed-on: http://review.couchbase.org/13141
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  2. @alk

    made notify_db_updated consume exits only from parent.MB-4686

    alk authored alk committed
    When compactor completes it sends exit normal to updater. That message
    is usually ignored (see handle_info implementation). But in
    notify_db_updated we consumed any exit and rethrowed it. Which is bad
    idea. Because we only care about exit message from parent.
    
    That fixes a bunch of crashes that happen after compaction completes.
    
    Damien Katz helped a lot with diagnosing this problem.
    
    Change-Id: I37ac6cbf7a7e4e3cf21eb4a7ffd737d69f87161c
    Reviewed-on: http://review.couchbase.org/13138
    Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
    Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Something went wrong with that request. Please try again.