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

Add CancelInvocation and GetCallInvocationId entries. #1967

Closed
wants to merge 3 commits into from

Conversation

slinkydeveloper
Copy link
Contributor

@slinkydeveloper slinkydeveloper commented Sep 17, 2024

Part of #1710 and #1687. The full train of PRs is here: #1687 (comment)

Copy link
Contributor

@pcholakov pcholakov left a comment

Choose a reason for hiding this comment

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

This is great, thanks so much for working on this long-standing request!

The changes make sense to me at a high level, and in detail, but I am not super familiar with all the parts of the code that the PR touches, so take it FWIW!

@@ -8,7 +8,7 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use super::*;
use super::{fixtures, matchers, *};
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

let mut test_env = TestEnv::create().await;

let invocation_target = InvocationTarget::mock_service();
let invocation_id = InvocationId::mock_random();
Copy link
Contributor

Choose a reason for hiding this comment

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

There's something I don't understand - why do the two journal entries share an invocation id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if you refer to the lines below here:

    tx.put_journal_entry(
        &invocation_id,
        1,
        &fixtures::background_invoke_entry(callee_1),
    )
    .await;

The key of the journal table is prefixed by the invocation id, which in this case is the caller invocation id. For the callee, i indeed generate a different invocation id (callee_1)

…60bf51

65560bf51 Add CancelInvocation and GetCallInvocationId entries. (restatedev#96)
0d6b476ea Update retry count comment

git-subtree-dir: crates/types/service-protocol
git-subtree-split: 65560bf51eb0cb2b5be6c61e0c308221afe6091e
Implement CancelInvocationEntry and GetInvocationIdEntry
@slinkydeveloper
Copy link
Contributor Author

Manually merged.

@slinkydeveloper slinkydeveloper deleted the issues/1710 branch September 27, 2024 12:05
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