[ 
https://issues.apache.org/jira/browse/COUCHDB-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995335#comment-15995335
 ] 

ASF subversion and git services commented on COUCHDB-3402:
----------------------------------------------------------

Commit 81ee7c5ac71e617a03e967b4fc5d0358f4ba9459 in couchdb's branch 
refs/heads/COUCHDB-3298-optimize-writing-kv-nodes from [~wohali]
[ https://gitbox.apache.org/repos/asf?p=couchdb.git;h=81ee7c5 ]

Fix error on race condition in mem3 startup

During mem3 startup, 2 paths attempt to call `couch_server:create/2` on
`_dbs`:

```
gen_server:init_it/6
  -> mem3_shards:init/1
    -> mem3_shards:get_update_seq/0
      -> couch_server:create/2
```

and

```
mem3_sync:initial_sync/1
  -> mem3_shards:fold/2
    -> couch_server:create/2
```

Normally, the first path completes before the second. If the second path
finishes first, the first path fails because it does not expect a
`file_exists` response.

This patch makes `mem3_util:ensure_enxists/1` more robust in the face of
a race to create `_dbs`.

Fixes COUCHDB-3402.

Approved by @davisp and @iilyak


> JS: dev/run timing out starting up nodes
> ----------------------------------------
>
>                 Key: COUCHDB-3402
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3402
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Test Suite
>            Reporter: Joan Touzet
>            Assignee: Joan Touzet
>            Priority: Critical
>
> Seen this a bunch of times recently in the Jenkins infrastructure. May be a 
> symptom of ASF Jenkins nodes being overloaded.
> {noformat}
> make[1]: Entering directory `/usr/src/couchdb/apache-couchdb-2.0.0-28dd801'
> # This might help with emfile errors during `make javascript`: ulimit -n 10240
> Failed to start all the nodes. Check the dev/logs/*.log for errors.
> make[1]: *** [javascript] Error 1
> make[1]: Leaving directory `/usr/src/couchdb/apache-couchdb-2.0.0-28dd801'
> make: *** [check] Error 2
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to