Browse Source

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 năm trước cách đây
mục cha
commit
e4cf5d402c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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()
 	}