[#1468] tree: Sync replication

Async replication leads to a lot of log undo/redo during background
replication. This leads to performance drop to almost zero.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-11-02 12:40:52 +03:00
parent d2ff4db847
commit c06ab2595b
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0
2 changed files with 3 additions and 3 deletions

View file

@ -190,7 +190,7 @@ func (s *Service) pushToQueue(cid cidSDK.ID, treeID string, op *pilorama.Move) {
treeID: treeID,
op: op,
}:
default:
case <-s.closeCh:
}
}

View file

@ -626,7 +626,7 @@ func sortByFilename(nodes []pilorama.NodeInfo, d GetSubTreeRequest_Body_Order_Di
}
// Apply locally applies operation from the remote node to the tree.
func (s *Service) Apply(_ context.Context, req *ApplyRequest) (*ApplyResponse, error) {
func (s *Service) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error) {
err := verifyMessage(req)
if err != nil {
return nil, err
@ -664,7 +664,7 @@ func (s *Service) Apply(_ context.Context, req *ApplyRequest) (*ApplyResponse, e
Meta: meta,
},
}:
default:
case <-s.closeCh:
}
return &ApplyResponse{Body: &ApplyResponse_Body{}, Signature: &Signature{}}, nil
}