From 96fa1c837819761fc5c706010a9677aab15ca46d Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Wed, 4 Oct 2017 08:49:57 -0400 Subject: [PATCH] Allow resetting manager to the same offset Helpful if you just want to update the metadata, or maybe in more async scenarios. --- offset_manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offset_manager.go b/offset_manager.go index 5b8539b58..6c01f959e 100644 --- a/offset_manager.go +++ b/offset_manager.go @@ -340,7 +340,7 @@ func (pom *partitionOffsetManager) ResetOffset(offset int64, metadata string) { pom.lock.Lock() defer pom.lock.Unlock() - if offset < pom.offset { + if offset <= pom.offset { pom.offset = offset pom.metadata = metadata pom.dirty = true