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

Side quest: Optimize ReadOnlyInvocationStatusTable#all_invoked_or_killed_invocations #2349

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

slinkydeveloper
Copy link
Contributor

This avoids loading the full InvocationStatus in memory, only to read invocation target and status. Depends on #2335, only the last commit is relevant to this PR

Comment on lines +354 to +371
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum InvocationStatusDiscriminants {
Scheduled,
Inboxed,
Invoked,
Suspended,
Killed,
Completed,
}

/// Lite status of an invocation.
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct InvocationLite {
pub status: InvocationStatusDiscriminants,
pub invocation_target: InvocationTarget,
}

protobuf_storage_encode_decode!(InvocationLite, crate::storage::v1::InvocationV2Lite);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only reason for this type to be here is the package organization, otherwise i could have hid everything in the partition-store module (and i could have even avoided defining the Lite type in the domain.proto).

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.

1 participant