forked from TrueCloudLab/frostfs-node
[#772] node: Apply gofumpt
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
00aa6d9749
commit
79088baa06
136 changed files with 293 additions and 239 deletions
|
@ -176,7 +176,8 @@ func mergeOperationStreams(streams []chan *pilorama.Move, merged chan<- *piloram
|
|||
}
|
||||
|
||||
func (s *Service) applyOperationStream(ctx context.Context, cid cid.ID, treeID string,
|
||||
operationStream <-chan *pilorama.Move) uint64 {
|
||||
operationStream <-chan *pilorama.Move,
|
||||
) uint64 {
|
||||
errGroup, _ := errgroup.WithContext(ctx)
|
||||
const workersCount = 1024
|
||||
errGroup.SetLimit(workersCount)
|
||||
|
@ -215,7 +216,8 @@ func (s *Service) applyOperationStream(ctx context.Context, cid cid.ID, treeID s
|
|||
}
|
||||
|
||||
func (s *Service) startStream(ctx context.Context, cid cid.ID, treeID string,
|
||||
height uint64, treeClient TreeServiceClient, opsCh chan<- *pilorama.Move) (uint64, error) {
|
||||
height uint64, treeClient TreeServiceClient, opsCh chan<- *pilorama.Move,
|
||||
) (uint64, error) {
|
||||
rawCID := make([]byte, sha256.Size)
|
||||
cid.Encode(rawCID)
|
||||
|
||||
|
@ -261,11 +263,9 @@ func (s *Service) startStream(ctx context.Context, cid cid.ID, treeID string,
|
|||
// already applied operation and keep good batching.
|
||||
// The method returns a height that service should start sync from in the next time.
|
||||
func (s *Service) synchronizeTree(ctx context.Context, cid cid.ID, from uint64,
|
||||
treeID string, nodes []netmapSDK.NodeInfo) uint64 {
|
||||
s.log.Debug(logs.TreeSynchronizeTree,
|
||||
zap.Stringer("cid", cid),
|
||||
zap.String("tree", treeID),
|
||||
zap.Uint64("from", from))
|
||||
treeID string, nodes []netmapSDK.NodeInfo,
|
||||
) uint64 {
|
||||
s.log.Debug(logs.TreeSynchronizeTree, zap.Stringer("cid", cid), zap.String("tree", treeID), zap.Uint64("from", from))
|
||||
|
||||
errGroup, egCtx := errgroup.WithContext(ctx)
|
||||
const workersCount = 1024
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue