Skip to content

Commit

Permalink
Merge pull request #8 from Huang-lin/master
Browse files Browse the repository at this point in the history
FIX:sort consumer list to prevent data conflict
  • Loading branch information
git-hulk authored Jun 27, 2017
2 parents 60916f7 + bf8d608 commit f400d00
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 f400d00

Please sign in to comment.