Merged
Conversation
The deletion test is flaky sometimes:
```
[2023-05-31T19:44:32.096Z] File delete tests
[2023-05-31T19:44:32.096Z] enable_database_recovery = false, context = delete
[2023-05-31T19:44:32.096Z] couch_file_tests:424: make_enable_recovery_test_case...ok
[2023-05-31T19:44:32.096Z] couch_file_tests:425: make_enable_recovery_test_case...ok
[2023-05-31T19:44:32.096Z] couch_file_tests:426: make_enable_recovery_test_case...ok
[2023-05-31T19:44:32.096Z] couch_file_tests:427: make_enable_recovery_test_case...*failed*
[2023-05-31T19:44:32.096Z] in function couch_file_tests:'-make_enable_recovery_test_case/3-fun-8-'/2 (test/eunit/couch_file_tests.erl, line 427)
[2023-05-31T19:44:32.096Z] in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71)
[2023-05-31T19:44:32.096Z] in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531)
[2023-05-31T19:44:32.096Z] in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356)
[2023-05-31T19:44:32.096Z] in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514)
[2023-05-31T19:44:32.096Z] in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456)
[2023-05-31T19:44:32.096Z] in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 346)
[2023-05-31T19:44:32.096Z] in call from eunit_proc:run_group/2 (eunit_proc.erl, line 570)
[2023-05-31T19:44:32.096Z] **error:{assertEqual,[{module,couch_file_tests},
[2023-05-31T19:44:32.096Z] {line,427},
[2023-05-31T19:44:32.096Z] {expression,"length ( DeletedFiles )"},
[2023-05-31T19:44:32.096Z] {expected,1},
[2023-05-31T19:44:32.096Z] {value,0}]}
[2023-05-31T19:44:32.096Z] output:<<"">>
```
It seems the renamed files are not found in the $root/.delete directory, which
is odd as renames are supposed to be atomic. Should we fsync dir entries
themselves? We could also add a sleep, but on first attempt is to add and extra
assert that file:name/2 actually returned an ok not some posix error.
jaydoane
approved these changes
May 31, 2023
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
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.
The deletion test is flaky sometimes:
It seems the renamed files are not found in the $root/.delete directory, which is odd as renames are supposed to be atomic. Should we fsync dir entries themselves? We could also add a sleep, but on first attempt is to add and extra assert that file:name/2 actually returned an ok not some posix error.