Skip to content

Storage nodes report their loads at the same time if they are started with empty netmap #3714

@carpawell

Description

@carpawell

Is your feature request related to a problem? Please describe.

I'm always frustrated when SNs report at the same time.

Describe the solution you'd like

One of or both:

  1. Update timers inside storage nodes when netmap is not empty.
  2. If netmap is empty, report with a random offset.

Describe alternatives you've considered

Keep as is, but the notary pool is over when there is are large number of nodes/containers.

Additional context

var nmLen = len(nm.Nodes())
indexInNM := slices.IndexFunc(nm.Nodes(), func(node netmapsdk.NodeInfo) bool {
return bytes.Equal(node.PublicKey(), c.binPublicKey)
})
if indexInNM == -1 {
indexInNM = nmLen
}
var stepsInEpoch uint32
if nmLen != 0 {
// likely there is no need to report less often than once per second
reportStep := min(time.Second, dur/maxReportsPerEpoch/time.Duration(nmLen))
stepsInEpoch = uint32(dur / reportStep)
}
var (
ticks timer.EpochTicks
reportTick, stopF = util.SingleAsyncExecutingInstance(reportHandler(c, l))
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4No visible changesS4RoutineU3RegularenhancementImproving existing functionalityneofs-storageStorage node application issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions