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

feat: simplified sourcer server API changes #32

Merged
merged 5 commits into from
Feb 29, 2024

Conversation

BulkBeing
Copy link
Collaborator

No description provided.

Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Sreekanth <[email protected]>
@vigith vigith changed the title Sourcer server - user API changes feat: simplified sourcer server API changes Feb 27, 2024
src/source.rs Outdated
Comment on lines 318 to 319
pos: Mutex<usize>,
acked: Mutex<usize>,
Copy link
Member

Choose a reason for hiding this comment

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

do these need to be tokio::Mutex?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pos is held across .await points in read function. So tokio::Mutex is needed. acked can use std::sync::Mutex

@vigith
Copy link
Member

vigith commented Feb 27, 2024

should we return early in the read fn in the example if there are un-acked messages?

@vigith vigith marked this pull request as ready for review February 29, 2024 15:12
@vigith vigith merged commit 19f975a into numaproj:main Feb 29, 2024
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