[SUPPORT] node: Allow to omit metabase.path if shard is disabled #1532
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1532
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fyrchik/frostfs-node:fix-config-parsing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This looks like a kludge. Well it is, since with configuration in ENV we are unable to check whether the "section" is empty.
Otherwise,
c.Value(si) == nil
check would work.I have also considered filtering all env data by prefix, but this is error-prone (because the same path could correspond to multiple sections).
I stayed with the current solution, because the changes to code are minimal and now it seems less wrong than before: we MUST have
metabase.path
, but we may omit it if the shard is unused.@ -41,6 +41,10 @@ func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config)
c.Sub(si),
)
if sc.Mode() == mode.Disabled {
You can use
sc.Mode().Disabled()
True, i wanted to leave changes to minimum.
b29a820b75
to71dd82e7bd
node: Allow to omit metabase.path if shard is disabledto [SUPPORT] node: Allow to omit metabase.path if shard is disabledfyrchik referenced this pull request2024-12-03 13:16:03 +00:00