writecache: Fix flush test #817

Merged
dstepanov-yadro merged 1 commit from dstepanov-yadro/frostfs-node:fix/test_flush_flaky into master 2023-11-20 15:09:37 +00:00

There is nothing wrong in logs. So highly likely background flusher has been incremented error counter before Flush call.

Now it is allowed to disable background flusher for testing purposes.

Closes #667

There is nothing wrong in logs. So highly likely background flusher has been incremented error counter before `Flush` call. Now it is allowed to disable background flusher for testing purposes. Closes #667
dstepanov-yadro added 1 commit 2023-11-17 14:48:40 +00:00
[#667] writecache: Fix flush test
All checks were successful
DCO action / DCO (pull_request) Successful in 1m28s
Vulncheck / Vulncheck (pull_request) Successful in 3m55s
Tests and linters / Staticcheck (pull_request) Successful in 4m15s
Build / Build Components (1.21) (pull_request) Successful in 4m40s
Build / Build Components (1.20) (pull_request) Successful in 4m54s
Tests and linters / Tests (1.20) (pull_request) Successful in 5m32s
Tests and linters / Lint (pull_request) Successful in 5m59s
Tests and linters / Tests (1.21) (pull_request) Successful in 6m59s
Tests and linters / Tests with -race (pull_request) Successful in 6m57s
8d18fa159e
Allow to disable background flusher for testing purposes.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
dstepanov-yadro reviewed 2023-11-17 14:51:27 +00:00
dstepanov-yadro reviewed 2023-11-17 14:51:29 +00:00
dstepanov-yadro reviewed 2023-11-17 14:51:32 +00:00
@ -96,3 +96,1 @@
func (c *cache) deleteFromDisk(ctx context.Context, keys []string) []string {
if len(keys) == 0 {
return keys
func (c *cache) deleteFromDisk(ctx context.Context, addr oid.Address) {
Author
Member

This change doesn't relate to fix, but small refactoring.

This change doesn't relate to fix, but small refactoring.
dstepanov-yadro requested review from storage-core-committers 2023-11-17 14:56:47 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-11-17 14:56:48 +00:00
aarifullin approved these changes 2023-11-20 09:24:55 +00:00
acid-ant approved these changes 2023-11-20 11:35:59 +00:00
dstepanov-yadro merged commit 8d18fa159e into master 2023-11-20 15:09:37 +00:00
dstepanov-yadro deleted branch fix/test_flush_flaky 2023-11-20 15:09:39 +00:00
fyrchik reviewed 2023-11-21 07:01:37 +00:00
@ -157,1 +159,4 @@
}
// WithDisableBackgroundFlush disables background flush, for testing purposes only.
func WithDisableBackgroundFlush() Option {
Owner

If it is for tests only, can we define it in _test.go file?

If it is for tests only, can we define it in `_test.go` file?
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#817
No description provided.