소스 검색

Fix offset-manager expiry timestamps to 'now'

Thanks to Maxim for pointing out that 0 doesn't mean now, it means unix epoch 0
(a long time ago).

Fixes #530.
Evan Huus 10 년 전
부모
커밋
e4cf5d402c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      offset_manager.go

+ 1 - 1
offset_manager.go

@@ -476,7 +476,7 @@ func (bom *brokerOffsetManager) constructRequest() *OffsetCommitRequest {
 	for s := range bom.subscriptions {
 		s.lock.Lock()
 		if s.dirty {
-			r.AddBlock(s.topic, s.partition, s.offset, 0, s.metadata)
+			r.AddBlock(s.topic, s.partition, s.offset, ReceiveTime, s.metadata)
 		}
 		s.lock.Unlock()
 	}