Hold mode lock when changing mode #603

Merged
fyrchik merged 1 commit from ale64bit/frostfs-node:fix/598-wc-test-panic into master 2023-08-14 07:12:29 +00:00
Member
No description provided.
ale64bit added 1 commit 2023-08-11 13:45:12 +00:00
[#598] Hold mode mutex when setting mode
Some checks failed
DCO action / DCO (pull_request) Successful in 4m38s
Vulncheck / Vulncheck (pull_request) Successful in 4m11s
Build / Build Components (1.21) (pull_request) Successful in 5m14s
Tests and linters / Lint (pull_request) Successful in 5m45s
Tests and linters / Staticcheck (pull_request) Successful in 6m7s
Build / Build Components (1.20) (pull_request) Successful in 6m55s
Tests and linters / Tests (1.21) (pull_request) Failing after 13m29s
Tests and linters / Tests with -race (pull_request) Failing after 13m52s
Tests and linters / Tests (1.20) (pull_request) Successful in 15m18s
745c9be4c9
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
ale64bit requested review from storage-core-committers 2023-08-11 13:45:24 +00:00
ale64bit requested review from storage-core-developers 2023-08-11 13:45:28 +00:00
fyrchik reviewed 2023-08-11 13:48:07 +00:00
@ -59,2 +59,4 @@
check(t, mb, bs, objects)
require.NoError(t, wc.Close())
Owner

We already have it in newCache via t.Cleanup, why do we need it here?

We already have it in `newCache` via `t.Cleanup`, why do we need it here?
Author
Member

true, removed it.

true, removed it.
fyrchik reviewed 2023-08-11 13:48:10 +00:00
ale64bit force-pushed fix/598-wc-test-panic from dc19d54181 to 745c9be4c9 2023-08-11 13:50:57 +00:00 Compare
ale64bit changed title from Hold mode lock when changing mode and close writecache after flush tests to Hold mode lock when changing mode 2023-08-11 13:51:36 +00:00

We have lost mtx.Lock/mtx.Unlock here: https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/377/files#diff-8513d44b0cfcfbc8e90a26903e4c57b1f19d4392
Previously, taking a lock was more granular. Can you check if we can make this lock more granular?

We have lost mtx.Lock/mtx.Unlock here: https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/377/files#diff-8513d44b0cfcfbc8e90a26903e4c57b1f19d4392 Previously, taking a lock was more granular. Can you check if we can make this lock more granular?
Author
Member

We have lost mtx.Lock/mtx.Unlock here: https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/377/files#diff-8513d44b0cfcfbc8e90a26903e4c57b1f19d4392
Previously, taking a lock was more granular. Can you check if we can make this lock more granular?

In which way was was it more granular? I put it back in the same place it was before.

> We have lost mtx.Lock/mtx.Unlock here: https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/377/files#diff-8513d44b0cfcfbc8e90a26903e4c57b1f19d4392 > Previously, taking a lock was more granular. Can you check if we can make this lock more granular? > In which way was was it more granular? I put it back in the same place it was before.

We have lost mtx.Lock/mtx.Unlock here: https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/377/files#diff-8513d44b0cfcfbc8e90a26903e4c57b1f19d4392
Previously, taking a lock was more granular. Can you check if we can make this lock more granular?

In which way was was it more granular? I put it back in the same place it was before.

Sorry, you're right, my mistake

> > We have lost mtx.Lock/mtx.Unlock here: https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/377/files#diff-8513d44b0cfcfbc8e90a26903e4c57b1f19d4392 > > Previously, taking a lock was more granular. Can you check if we can make this lock more granular? > > > > In which way was was it more granular? I put it back in the same place it was before. Sorry, you're right, my mistake
dstepanov-yadro approved these changes 2023-08-14 06:47:57 +00:00
fyrchik approved these changes 2023-08-14 07:12:23 +00:00
fyrchik merged commit 376f03a445 into master 2023-08-14 07:12:29 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
3 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#603
No description provided.