Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix offset commit bug #424

Merged
merged 1 commit into from
Apr 6, 2020
Merged

fix offset commit bug #424

merged 1 commit into from
Apr 6, 2020

Conversation

718529333
Copy link
Contributor

@718529333 718529333 commented Apr 5, 2020

when we use defaultRetentionTime -1
we get the gen

gen := Generation{
	ID:              generationID,
	GroupID:         cg.config.ID,
	MemberID:        memberID,
	Assignments:     cg.makeAssignments(assignments, offsets),
	conn:            conn,
	done:            make(chan struct{}),
	retentionMillis: int64(cg.config.RetentionTime / time.Millisecond),
	log:             cg.withLogger,
	logError:        cg.withErrorLogger,
}

the retentionMillis of gen is 0

request := offsetCommitRequestV2{
	GroupID:       g.GroupID,
	GenerationID:  g.ID,
	MemberID:      g.MemberID,
	RetentionTime: g.retentionMillis,
	Topics:        topics,
}

then offsetcommit request is bad with the RetentionTime=0
the group offset is expired when all consumer is down
kafka server params offsets.retention.minutes is not work
so when we restart consumer group after offsets.retention.check.interval.ms,we will lost the offset commit early

@stevevls
Copy link
Contributor

stevevls commented Apr 6, 2020

This makes sense. Thanks for the fix!

@stevevls stevevls merged commit c0cc0f5 into segmentio:master Apr 6, 2020
stevevls pushed a commit that referenced this pull request Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants