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

Revert on transient redis error #319

Merged
merged 1 commit into from
May 21, 2024
Merged

Revert on transient redis error #319

merged 1 commit into from
May 21, 2024

Conversation

alexsnaps
Copy link
Member

@alexsnaps alexsnaps commented May 9, 2024

Fixes #297
Based off #318

Comment on lines +179 to +187
pub async fn consume<F, Fut, T, E>(&self, max: usize, consumer: F) -> Result<T, E>
where
F: FnOnce(HashMap<Counter, Arc<CachedCounterValue>>) -> Fut,
Fut: Future<Output = O>,
Fut: Future<Output = Result<T, E>>,
Copy link
Member Author

Choose a reason for hiding this comment

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

This signature is getting somewhat … ugly. But async closures aren't a stable thing yet, so I can't have anything call await in the closure passed to consume… that's how I went about it instead…

@alexsnaps alexsnaps force-pushed the revert_on_redis_err branch from 500f1bb to 27af568 Compare May 9, 2024 18:33
Base automatically changed from batch_size to main May 13, 2024 13:34
@alexsnaps alexsnaps force-pushed the revert_on_redis_err branch from 27af568 to 994a994 Compare May 13, 2024 13:47
@alexsnaps alexsnaps marked this pull request as ready for review May 13, 2024 13:47
@alexsnaps alexsnaps requested review from chirino and eguzki May 17, 2024 12:03
@alexsnaps alexsnaps force-pushed the revert_on_redis_err branch 2 times, most recently from 57712fd to 6616811 Compare May 17, 2024 16:38
@alexsnaps alexsnaps force-pushed the revert_on_redis_err branch from 6616811 to 59a9f85 Compare May 21, 2024 11:18
Copy link
Contributor

@chirino chirino left a comment

Choose a reason for hiding this comment

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

lgtm

@alexsnaps alexsnaps merged commit 2813eb3 into main May 21, 2024
18 checks passed
@alexsnaps alexsnaps deleted the revert_on_redis_err branch May 21, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

async fn flush_batcher_and_update_counters drops pending writes on partition
2 participants