554325746@qq.com
2019-07-05 0f45d9efa1dfd1580975ecc410d44de053f7af81
shardmap/shardmap.go
@@ -83,11 +83,11 @@
}
// modify by long.
func (s *ShardMap) Walk(wf wfOp, cfrom string) []protomsg.Baseinfo{
func (s *ShardMap) Walk(wf wfOp, cfrom string) []*protomsg.Baseinfo{
    var wg sync.WaitGroup
    var second float32 
    var baseinfos []protomsg.Baseinfo
    var baseinfos []*protomsg.Baseinfo
   for _, si := range s.shards {
        wg.Add(1)
@@ -99,7 +99,7 @@
                 if second == -1 {
                        continue 
                 }
                 if info, ok := value.(protomsg.Baseinfo) ;ok {
                 if info, ok := value.(*protomsg.Baseinfo) ;ok {
                    fmt.Println("比对分数: ", second)
                    info.CompareScore = second
                    baseinfos = append(baseinfos,info)