Skip to content

Commit e21251f

Browse files
authored
change the default value for last_stored_offset (#307)
fixes:#306 Signed-off-by: Gabriele Santomaggio <g.santomaggio@gmail.com>
1 parent 77deb9d commit e21251f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ dist/
2828

2929
perfTest/perfTest
3030
go.dev/
31+
local_ex/

pkg/stream/coordinator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ func (coordinator *Coordinator) NewConsumer(messagesHandler MessagesHandler,
202202
status: open,
203203
mutex: &sync.Mutex{},
204204
MessagesHandler: messagesHandler,
205+
lastStoredOffset: -1, // because 0 is a valid value for the offset
205206
isPromotedAsActive: true,
206207
}
207208

0 commit comments

Comments
 (0)