Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do not commit offsets for past generations if partition not owned#1330

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
nachogiljaldo wants to merge4 commits intosegmentio:main
base:main
Choose a base branch
Loading
fromnachogiljaldo:do_not_commit_offsets_for_past_generations_if_partition_not_owned

Conversation

@nachogiljaldo
Copy link
Contributor

This is a skeleton PR aiming for discussion related to#1308

In that issue, I describe how rebalances can lead to a situation where the consumer receiving the partition does not read messages in spite of lag existing (because conn's offset is > than the broker's current offset and there's no new messages coming).

I was aiming to fix it by avoiding commits for past generations, to do so, I add the generation id to the message and when committing, I log an error instead of adding it to the stash if it belongs to a generation < than current.

This has the risk of losing valid commits when the new generation comes (as its associated generation < latest generation.id), however it works because a new generation ends up creating new connections which means uncommitted events are duplicated. It is not that I love it because it works incidentally but it does work as my test shows.

If you have a different / better approach I am happy to explore it if you do explain it a bit.

logrusorgru reacted with rocket emoji
@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@nachogiljaldonachogiljaldoforce-pushed thedo_not_commit_offsets_for_past_generations_if_partition_not_owned branch from89f3edd to49e263bCompareNovember 15, 2024 21:03
@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

@nachogiljaldonachogiljaldoforce-pushed thedo_not_commit_offsets_for_past_generations_if_partition_not_owned branch from49e263b to8091163CompareNovember 15, 2024 21:14
@seg-atlantis-prod
Copy link

Atlantis commands can't be run on fork pull requests. To enable, set --allow-fork-prs or, to disable this message, set --silence-fork-pr-errors

seg-atlantis-prod[bot] reacted with eyes emoji

@seg-atlantis-prod
Copy link

Error parsing command: EOF found when expecting closing quote

conn.go Outdated
errInvalidWriteTopic=errors.New("writes must NOT set Topic on kafka.Message")
errInvalidWritePartition=errors.New("writes must NOT set Partition on kafka.Message")

undefinedGenerationIdint32=-1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It should beconst, notvar.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

thanks for the feedback, I applied the suggestion, I would also appreciate feedback on the general approach as well 🙏

logrusorgru reacted with eyes emoji
@logrusorgru
Copy link

@nachogiljaldo , please, if it’s not a problem for you, apply this patchnachogiljaldo#1 . (No changes in logic).

@logrusorgru
Copy link

Merging can be performed automatically with 1 approving review.

Interesting, it means maintainers review? Or it can accept my review too?

…_generations_if_partition_not_ownedRename *Id -> *ID, following Go naming convention.
@nachogiljaldo
Copy link
ContributorAuthor

@nachogiljaldo , please, if it’s not a problem for you, apply this patchnachogiljaldo#1 . (No changes in logic).

Thanks@logrusorgru

Interesting, it means maintainers review? Or it can accept my review too?

I believe a maintainer :(

@M0rdecay
Copy link

M0rdecay commentedFeb 22, 2025
edited
Loading

Hello! Any chances new release will be published with this patch?

UPD 27.02
Okay, using a raw ConsumerGroup like inexample helps to avoid this error.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@erushingerushingAwaiting requested review from erushing

@petedannemannpetedannemannAwaiting requested review from petedannemann

1 more reviewer

@logrusorgrulogrusorgrulogrusorgru left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@nachogiljaldo@logrusorgru@M0rdecay

[8]ページ先頭

©2009-2025 Movatter.jp