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: require specifying event time when dropping a message using source transformer #90

Merged
merged 5 commits into from
Dec 4, 2023

Conversation

KeranYang
Copy link
Member

No description provided.

@KeranYang KeranYang marked this pull request as ready for review December 4, 2023 15:45
@KeranYang KeranYang marked this pull request as draft December 4, 2023 18:16
.
Signed-off-by: Keran Yang <[email protected]>
@KeranYang KeranYang marked this pull request as ready for review December 4, 2023 18:33
Comment on lines 64 to 75
// Deprecated: message created using this function will not have a valid eventTime, hence excluded from watermark calculation.
// Even though a message is dropped, it is still considered as being processed, hence the watermark should be updated accordingly.
// Since v0.5.2, we recommend using MessageToDropWithEventTime instead.
func MessageToDrop() Message {
return Message{eventTime: eventTimeForDrop, value: []byte{}, tags: []string{DROP}}
}

// MessageToDropWithEventTime creates a Message to be dropped with eventTime
func MessageToDropWithEventTime(eventTime time.Time) Message {
return Message{eventTime: eventTime, value: []byte{}, tags: []string{DROP}}
}

Copy link
Member

Choose a reason for hiding this comment

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

what if, if we make this a breaking change and MessageToDrop needs event-time?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do.

Signed-off-by: Keran Yang <[email protected]>
.
Signed-off-by: Keran Yang <[email protected]>
@KeranYang KeranYang merged commit c6d81fd into numaproj:main Dec 4, 2023
3 checks passed
yhl25 pushed a commit that referenced this pull request Dec 7, 2023
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