Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
sdojjy committed Aug 16, 2024
1 parent c7535dd commit 201e54f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions coordinator/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func NewCoordinator(capture *common.NodeInfo,
id,
c.newChangefeed, c.newBootstrapMessage,
scheduler.NewBasicScheduler(id),
scheduler.NewBalanceScheduler(time.Minute, 1000),
)

// receive messages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ func (m *DispatcherManagerManager) handleAddDispatcherManager(from messaging.Ser
eventDispatcherManager.SetMaintainerID(from)
}
response := &heartbeatpb.MaintainerBootstrapResponse{
Statuses: make([]*heartbeatpb.TableSpanStatus, 0, eventDispatcherManager.GetDispatcherMap().Len()),
ChangefeedID: maintainerBootstrapRequest.ChangefeedID,
Statuses: make([]*heartbeatpb.TableSpanStatus, 0, eventDispatcherManager.GetDispatcherMap().Len()),
}
eventDispatcherManager.GetDispatcherMap().ForEach(func(tableSpan *common.TableSpan, tableEventDispatcher *dispatcher.TableEventDispatcher) {
response.Statuses = append(response.Statuses, &heartbeatpb.TableSpanStatus{
Expand Down
2 changes: 0 additions & 2 deletions maintainer/maintainer_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ func (m *Manager) RecvMessages(ctx context.Context, msg *messaging.TargetMessage
case <-ctx.Done():
return ctx.Err()
case m.msgCh <- msg:
default:
log.Warn("msg chan is full")
}
return nil
// receive bootstrap response message from dispatcher manager manager
Expand Down
1 change: 0 additions & 1 deletion pkg/messaging/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func (r *router) runDispatch(ctx context.Context, wg *sync.WaitGroup, out <-chan
err := handler(ctx, msg)
if err != nil {
log.Error("router: close, since handle message failed", zap.Error(err), zap.Any("msg", msg))
return
}
}
}
Expand Down

0 comments on commit 201e54f

Please sign in to comment.