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.
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
Fix a concurrency bug of JournalStorage
set_trial_state_values
. #4033Fix a concurrency bug of JournalStorage
set_trial_state_values
. #4033Changes from 11 commits
ac0d6d8
6765d88
8ec27d7
6f20830
eec3075
404385f
bae0113
1ddb202
3e19989
a43b178
e8d2079
ed8082b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could I ask one thing? Is there any reason why we can't execute multi-process test for other dbs such as sqlite3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STORAGE_MODES
variable, which is used withpytest.mark.parametrize()
, containssqlite3
,redis
, andinmemory
except forjournal
.sqlite3
: To pop waiting trials concurrently, RDBStorage usesSELECT ... FOR UPDATE
syntax, which is unsupported in SQLite3. Furthermore, SQLite3 does not support a high level of concurrency. It sometimes raises "database is locked" errors and it makes tests fragile.redis
: We usefakeredis
for testingRedisStorage
. It doesn't support multiple processes.So here I put this test case instead of using
pytest.mark.parametrize("storage_mode", STORAGE_MODES)
.