shard: Set Disabled as default mode for components #1168

Merged
fyrchik merged 1 commit from acid-ant/frostfs-node:bugfix/shard-create-mode-cmp into master 2024-06-11 15:13:43 +00:00
Member

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant force-pushed bugfix/shard-create-mode-cmp from c217699e2a to b3b0a0dade 2024-06-07 12:59:09 +00:00 Compare
acid-ant force-pushed bugfix/shard-create-mode-cmp from b3b0a0dade to e31104c9c9 2024-06-07 12:59:53 +00:00 Compare
acid-ant requested review from storage-core-committers 2024-06-07 13:10:05 +00:00
acid-ant requested review from storage-core-developers 2024-06-07 13:10:13 +00:00
achuprov approved these changes 2024-06-07 14:36:04 +00:00
dstepanov-yadro approved these changes 2024-06-07 14:44:37 +00:00
fyrchik reviewed 2024-06-09 18:34:37 +00:00
@ -57,0 +60,4 @@
// WithMode sets mode.
func WithMode(mode mode.Mode) Option {
return func(o *options) {
o.mode = mode
Owner

Why is it important if we already provide the mode in Open?

Why is it important if we already provide the mode in `Open`?
Author
Member

Because in degraded scenario, we skip Open and Init for write-cache, my fault.

Because in degraded scenario, we skip [Open](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/a0c588263bd550bb131a8ed2f1a5ad318811018c/pkg/local_object_storage/shard/control.go#L58) and [Init](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/a0c588263bd550bb131a8ed2f1a5ad318811018c/pkg/local_object_storage/shard/control.go#L125) for write-cache, my fault.
Owner

I think default values should be usable (and "degraded" mode being the default for write-cache is accidental).
What about using disabled for everything and change this mode on Open? It seems logical.

I think default values should be usable (and "degraded" mode being the default for write-cache is accidental). What about using `disabled` for everything and change this mode on `Open`? It seems logical.
Author
Member

Sounds better. Updated.

Sounds better. Updated.
acid-ant force-pushed bugfix/shard-create-mode-cmp from e31104c9c9 to b71675add6 2024-06-10 14:49:34 +00:00 Compare
acid-ant changed title from shard: Set `mode` for components when created to shard: Set `Disabled` as default `mode` for components 2024-06-10 14:50:01 +00:00
acid-ant requested review from achuprov 2024-06-10 14:50:24 +00:00
acid-ant requested review from dstepanov-yadro 2024-06-10 14:50:25 +00:00
acid-ant force-pushed bugfix/shard-create-mode-cmp from b71675add6 to e7e3bbbc25 2024-06-10 14:52:45 +00:00 Compare
fyrchik approved these changes 2024-06-10 15:01:33 +00:00
achuprov approved these changes 2024-06-11 07:31:00 +00:00
fyrchik merged commit b9fcaad21f into master 2024-06-11 15:13:43 +00:00
fyrchik added this to the v0.41.0 milestone 2024-06-14 07:00:40 +00:00
Sign in to join this conversation.
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#1168
No description provided.