Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions golang/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ func (cli *defaultClient) startUp() error {
if err != nil {
cli.log.Errorf("scheduled queryRoute err=%v", err)
}
clearOldRouteSizeCache(oldRoute.([]*v2.MessageQueue))
if newRoute == nil && oldRoute != nil {
cli.log.Info("newRoute is nil, but oldRoute is not. do not update")
return true
Expand All @@ -529,6 +530,12 @@ func (cli *defaultClient) startUp() error {
ticker.Tick(f, time.Second*30, cli.done)
return nil
}

func clearOldRouteSizeCache(oldRoutes []*v2.MessageQueue) {
for _, route := range oldRoutes {
route.ClearSizeCache()
}
}
func (cli *defaultClient) notifyClientTermination() {
cli.log.Info("start notifyClientTermination")
ctx := cli.Sign(context.Background())
Expand Down
7 changes: 7 additions & 0 deletions golang/protocol/v2/definition.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.