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

Process fetch responses #64

Open
wants to merge 109 commits into
base: feat/fetch-response-queue
Choose a base branch
from

Conversation

jost-s
Copy link
Contributor

@jost-s jost-s commented Jan 3, 2025

Process incoming responses to fetch requests. This completes the cycle from sending fetch request -> sending fetch response -> receiving fetch response.

A next step could be an integration test of all three parts.

depends on #63

resolves #62

@jost-s jost-s changed the base branch from main to feat/fetch-response-queue January 3, 2025 02:16
@jost-s jost-s force-pushed the feat/process-fetch-responses branch from 59c92a7 to 153b705 Compare January 3, 2025 02:21
@@ -69,6 +70,7 @@ impl PartialOrd for StoredOp {
}

/// The API that a kitsune2 host must implement to provide data persistence for kitsune2.
#[automock]
Copy link
Contributor Author

@jost-s jost-s Jan 3, 2025

Choose a reason for hiding this comment

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

Auto-mocking this trait. I'll refactor the other fetch test files using automock too.

@jost-s jost-s force-pushed the feat/process-fetch-responses branch from 153b705 to 85f839e Compare January 3, 2025 02:28
@jost-s jost-s requested a review from a team January 3, 2025 02:28
@jost-s jost-s force-pushed the feat/fetch-response-queue branch from 4e00657 to 57b3547 Compare January 3, 2025 02:32
@jost-s jost-s force-pushed the feat/process-fetch-responses branch from 85f839e to f338b3a Compare January 3, 2025 02:34
ops: Vec<op_store::MetaOp>,
) -> BoxFut<'_, K2Result<()>> {
Box::pin(async move {
match self.op_store.process_incoming_ops(ops.clone()).await {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering if there should be some protection against invalid ops or DoS attacks here. But it should probably be in the module that owns the fetch module.

@jost-s jost-s force-pushed the feat/fetch-response-queue branch 6 times, most recently from a3ee21f to 8631869 Compare January 4, 2025 22:44
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.

[k2] fetch response handler
1 participant