Skip to content

Commit

Permalink
Fixes issue when worker not running, burrow not getting new state
Browse files Browse the repository at this point in the history
MTime in zookeeper will only get updating when being committed or new message pushed, however, burrow has a short-interval check for current and previous timestamp, this will prevent the next checking interval to complete if partition MTime not changed. This fix is basically to tell burrow checks anyway if two adjacent timestamp is the same.
  • Loading branch information
Yiyang Song authored and Yiyang Song committed Dec 17, 2015
1 parent 2ad3862 commit 7b9181a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion offsets_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func (storage *OffsetStorage) addConsumerOffset(offset *PartitionOffset) {
} else {
// Prevent old offset commits, and new commits that are too fast (less than the min-distance config)
previousTimestamp := storage.offsets[offset.Cluster].consumer[offset.Group][offset.Topic][offset.Partition].Prev().Value.(*ConsumerOffset).Timestamp
if offset.Timestamp-previousTimestamp < (storage.app.Config.Lagcheck.MinDistance * 1000) {
if offset.Timestamp-previousTimestamp < (storage.app.Config.Lagcheck.MinDistance * 1000) && offset.Timestamp-previousTimestamp != 0{
storage.offsets[offset.Cluster].consumerLock.Unlock()
return
}
Expand Down

0 comments on commit 7b9181a

Please sign in to comment.