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

chore: update the description for Pending() interface #84

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

KeranYang
Copy link
Member

No description provided.

// Read should never attempt to close the message channel as the caller owns the channel.
Read(ctx context.Context, readRequest ReadRequest, messageCh chan<- Message)
// Ack acknowledges the data from the source.
Ack(ctx context.Context, request AckRequest)
// Pending returns the number of pending messages.
// When the return value is negative, it indicates the pending information is not available.
// With pending information being not available, the Numaflow platform doesn't auto-scale the source.
Copy link
Member

Choose a reason for hiding this comment

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

What should be the returned value for being not available?

Copy link
Member Author

@KeranYang KeranYang Oct 2, 2023

Choose a reason for hiding this comment

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

Sorry the line above(L18) mentioned that if the returned value is negative, it indicate pending is not available

Copy link
Member

Choose a reason for hiding this comment

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

oh.. missed that.

Shall we expose a constant for it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't have a strong opinion on this one. I think asking the user to return a random negative number is already quite straightforward.

@KeranYang KeranYang requested a review from whynowy October 2, 2023 21:29
@KeranYang KeranYang marked this pull request as ready for review October 2, 2023 21:29
@KeranYang KeranYang merged commit f0a6686 into numaproj:main Oct 2, 2023
2 checks passed
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