[#166] node: Parallelize background tree service sync #215

Merged
fyrchik merged 1 commit from aarifullin/frostfs-node:feature/166-sync_tree into master 2023-04-07 04:43:33 +00:00
Member
  • Run sync task for nodes in parallel within errgroup worker pool

Signed-off-by: Airat Arifullin a.arifullin@yadro.com

* Run sync task for nodes in parallel within errgroup worker pool Signed-off-by: Airat Arifullin a.arifullin@yadro.com
aarifullin reviewed 2023-04-05 12:26:00 +00:00
@ -164,0 +182,4 @@
newHeight := uint64(math.MaxUint64)
for range nodes { // take minimum across all clients
height := <-heights
if height < newHeight {
Author
Member

possible hangup, fix this

possible hangup, fix this
aarifullin marked this conversation as resolved
dstepanov-yadro reviewed 2023-04-05 12:42:18 +00:00
@ -151,3 +149,1 @@
h, err := s.synchronizeSingle(ctx, cid, treeID, height, treeClient)
if height < h {
height = h
cc, err := grpc.DialContext(egCtx, a.URIAddr(), grpc.WithTransportCredentials(insecure.NewCredentials()))

I'm a little confused about these err variables. Can we separate errGroup.Go error and the errors inside the iterator?

I'm a little confused about these `err` variables. Can we separate `errGroup.Go` error and the errors inside the iterator?
Author
Member

OK. Removed err error name at all. Now the method is returned by returns nil

OK. Removed `err error` name at all. Now the method is returned by `returns nil`
dstepanov-yadro marked this conversation as resolved
aarifullin force-pushed feature/166-sync_tree from 1075c16989 to 94ece12084 2023-04-05 12:54:08 +00:00 Compare
aarifullin force-pushed feature/166-sync_tree from 94ece12084 to 8b2885f242 2023-04-05 12:56:59 +00:00 Compare
aarifullin requested review from storage-core-committers 2023-04-05 13:16:18 +00:00
aarifullin requested review from storage-core-developers 2023-04-05 13:16:18 +00:00
dstepanov-yadro approved these changes 2023-04-05 13:43:00 +00:00
aarifullin requested review from fyrchik 2023-04-06 11:09:36 +00:00
fyrchik approved these changes 2023-04-06 15:53:18 +00:00
acid-ant approved these changes 2023-04-06 19:29:47 +00:00
fyrchik merged commit 56282edf02 into master 2023-04-07 04:43:33 +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#215
No description provided.