Skip to content

Commit

Permalink
group/commit: return error if offset determined from timestamp is -1
Browse files Browse the repository at this point in the history
  • Loading branch information
birdayz committed Apr 8, 2020
1 parent 4fd7f94 commit 4683122
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/kaf/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ func createGroupCommitOffsetCmd() *cobra.Command {
if err != nil {
errorExit("Failed to determine offset for timestamp: %v", err)
}

if o == -1 {
errorExit("Determined offset -1 from timestamp. Skipping.", o)
}

off = o

fmt.Printf("Determined offset %v from timestamp.\n", off)
Expand Down

0 comments on commit 4683122

Please sign in to comment.