forked from apache/couchdb
-
Notifications
You must be signed in to change notification settings - Fork 3
Cherry picks #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Cherry picks #2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
This adds a test to ensure that the changes_listener process exits when the mem3_shards process is shut down. COUCHDB-3398
Simplify getting changes listener pid for testing
Recently couch_lru was changed to use ets tables. During eprof profiling it showed improved performance however recently in a larger test with more concurrent updates and 5000 max dbs open it showed a significant degradation compared to the previous (gb_tree-based) version. GH Issue apache#528
This allows us to make some better assertions/logging when starting our application list on what should and should not already be started.
Databases are closed asynchronously. However it was not accounted for in the test case. This commit waits database to close before it makes a decission to abort the test. I.e. if test case detects that database is still opened after 1 second it considers it as failure.
This reverts commit a5e3deb.
couch_server is responsible for calling hash_admin_passwords whenever "admin" section of config changes. However as you can see it from [here](https://github.com/apache/couchdb/blob/master/src/couch/src/couch_server.erl#L219) the call is asynchronous. This means that our test cases might fail when we try to using admin user while admin password is not yet hashed.
Author
|
+1 |
iilyak
added a commit
that referenced
this pull request
Jul 6, 2020
Previously the auth was injected unconidtionally. There were two problems: 1. no way to specify `basic_auth` credentials 2. no way to disable injection Due to #2 it was impossible to use other user than hardcoded `adm` () in `Couch.login/3`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry Picks
81ee7c5: Fix error on race condition in mem3 startup
ca4761c: Increase timeout for compression tests
3691c2e: Test changes_listener dies on mem3_shards shutdown
9d99d6e: Expose mem3_shards:get_changes_pid/0
32b5402: chore: double test timeout see COUCHDB-3408
e8b2c74: chore: increase timeout for pausing writer COUCHDB-3384
fb6faec: Revert couch_lru to use gb_trees
55623f4: Pre-calculate application start order
4683f51: Whait db close a little bit before failing test
ed1609b: Make sure we cache admin pass prior to test run
Reverted commits
a5e3deb: Revert "Re-enable attachment replication tests"