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

driver/reader: return the next offset instead of sarama.OffsetNewest #198

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

july2993
Copy link
Contributor

@july2993 july2993 commented Feb 13, 2019

What problem does this PR solve?

relate issue: https://internal.pingcap.net/jira/browse/TOOL-932
Suppose the ts in queue is
1 2 3
we use ts = 3 to seek the offset, it return sarama.OffsetNewest
at the same time some data pushed to queue it become
1 2 3 4
we use sarama.OffsetNewest to consume, so we lost the msg ts = 4

What is changed and how it works?

return the next offset instead of sarama.OffsetNewest

Check List

Tests

Code changes

Side effects

Related changes

Suppose the ts in queue is
1 2 3
we use ts = 3 to seek the offset, it return sarama.OffsetNewest
at the same time some data pushed to queue it become
1 2 3 4
we use sarama.OffsetNewest to consume, so we lost the msg ts = 4
@WangXiangUSTC
Copy link
Contributor

LGTM

@IANTHEREAL
Copy link
Collaborator

LGTM

@july2993 july2993 merged commit 23405d8 into master Feb 15, 2019
@july2993 july2993 deleted the hjh/offset branch February 15, 2019 11:07
july2993 added a commit that referenced this pull request Feb 21, 2019
…198)

Suppose the ts in queue is
1 2 3
we use ts = 3 to seek the offset, it return sarama.OffsetNewest
at the same time some data pushed to queue it become
1 2 3 4
we use sarama.OffsetNewest to consume, so we lost the msg ts = 4
july2993 added a commit that referenced this pull request Feb 21, 2019
…198)

Suppose the ts in queue is
1 2 3
we use ts = 3 to seek the offset, it return sarama.OffsetNewest
at the same time some data pushed to queue it become
1 2 3 4
we use sarama.OffsetNewest to consume, so we lost the msg ts = 4
july2993 added a commit that referenced this pull request Feb 22, 2019
…198) (#203)

Suppose the ts in queue is
1 2 3
we use ts = 3 to seek the offset, it return sarama.OffsetNewest
at the same time some data pushed to queue it become
1 2 3 4
we use sarama.OffsetNewest to consume, so we lost the msg ts = 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants