Skip to content

Commit

Permalink
FIX:sort consumer list to prevent data conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
huanglin committed Jun 27, 2017
1 parent 60916f7 commit bf8d608
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zk_group_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"sort"
"strconv"
"time"

Expand Down Expand Up @@ -243,7 +244,8 @@ func (s *ZKGroupStorage) GetConsumerList(group string) ([]string, error) {
if err != nil {
return nil, err
}
return consumerList, err
sort.Strings(consumerList)
return consumerList, nil
}

func (s *ZKGroupStorage) CommitOffset(group, topic string, partition int32, offset int64) error {
Expand Down

0 comments on commit bf8d608

Please sign in to comment.