Skip to content

Commit

Permalink
Update changelog for #709
Browse files Browse the repository at this point in the history
Also remove unnecessary variable.
  • Loading branch information
eapache committed Jul 18, 2016
1 parent 4124e96 commit 366453c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Bug Fixes:
([#685](https://github.com/Shopify/sarama/pull/685)).
- Fix a possible tight loop in the consumer
([#693](https://github.com/Shopify/sarama/pull/693)).
- Fix possible negative partition value from the HashPartitioner
([#709](https://github.com/Shopify/sarama/pull/709)).

#### Version 1.9.0 (2016-05-16)

Expand Down
3 changes: 1 addition & 2 deletions partitioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ func (p *hashPartitioner) Partition(message *ProducerMessage, numPartitions int3
if err != nil {
return -1, err
}
hash := int32(p.hasher.Sum32())
partition := hash % numPartitions
partition := int32(p.hasher.Sum32()) % numPartitions
if partition < 0 {
partition = -partition
}
Expand Down

0 comments on commit 366453c

Please sign in to comment.