Add RestartExecutionsWithoutMessages to IFunctionStore#178
Merged
Conversation
Adds a lighter variant of RestartExecutions that restarts flows and returns their effects without fetching messages. Introduces the StoredFlowWithEffects record and implements the method across the in-memory, PostgreSQL, MariaDB and SqlServer stores (reusing the existing restart/effects helpers), plus the CrashableFunctionStore decorators. Covered by store-level tests in StoreCrudTests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a lighter variant of
RestartExecutions—RestartExecutionsWithoutMessages— that restarts flows and returns their effects without fetching messages. Useful for restart paths that don't need the message snapshot, avoiding the extra message query/round-trip.Changes
StoredFlowWithEffects(StoredFlow, IReadOnlyList<StoredEffect>, IStorageSession)—StoredFlowWithEffectsAndMessagesminus theMessagesfield.IFunctionStore.RestartExecutionsWithoutMessages(IReadOnlyList<StoredId>, ReplicaId).MessageStore.GetMessagescall.RestartFlowsAsync, so just the restart call.CrashableFunctionStoredecorators (test + sample) delegate the new method.All stores reuse the existing private helpers — no new SQL.
Tests
Four store-level tests added to
StoreCrudTests(template + overrides for all four stores): restart multiple unowned flows, skip already-owned flows, empty input, and includes-existing-effects (which also confirms messages aren't fetched, since the return type has noMessagesfield).All 16 new tests pass across InMemory, PostgreSQL, MariaDB and SqlServer. Build is clean (0 warnings, 0 errors).