Open
Conversation
1. ST_OUTBOUND_MSG 1. Maintains an auto-incrementing msg_id per sender. 2. Stores in-flight outbound reducer calls (outbox pattern). 3. Used by IdcActor to issue remote calls with strictly increasing msg_id. 2. ST_INBOUND_MSG 1. Tracks latest processed msg_id per sender along with reducer result 2. For duplicate requests where the msg_id is already present, the result is returned without executing the reducer. 3. Requests with a msg_id older than the latest seen for a sender are dropped
- update `schema` crate for validation logic - update `TableSchema` with `outbox: Option<OutboxDef>` field
- Drives reducer execution from `ST_OUTBOUND_MSG` - Calls `on_result` reducer and delete entry from `ST_OUTBOUND_MSG` in same transaction. - If reducer fails, delete entry in next transaction, somewhat similar to `SchedulerActror` - Reducer failure are only considered if reducer actually ran and returned error, all other cases of error will result in retrying. `call_from_database(database_identity, msg_id, params)` - Caller should ensure `msg_id` never decrease for same sender `database_identity` else API returns `InvalidRequest`. - If reducer ran and failed it returns `StatusCode::UNPROCESSABLE_ENTITY`, which caller shouln't retry. - All other errors, including network errors are retried by `IdcActor`.
This was referenced Apr 13, 2026
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.
Implements outbox part of IDC proposal.
PR can be best reviewed commit-wise.
end to end smoketest is defined in #4781 along with hacky macro changes.
Description of changes:
System Tables
ST_OUTBOUND_MSGmsg_idper sender.IdcActorto issue remote calls with strictly increasingmsg_id.ST_INBOUND_MSGmsg_idper sender along with reducer resultmsg_idis already present, the result is returned without executing the reducer.msg_idolder than the latest seen for a sender are droppedActor
IDCActorhandles execution.ST_OUTBOUND_MSGon_resultreducer and delete entry fromST_OUTBOUND_MSGin same transaction.SchedulerActrorAPI
call_from_database(database_identity, msg_id, params)msg_idnever decrease for same senderdatabase_identityelse API returnsInvalidRequest.StatusCode::UNPROCESSABLE_ENTITY, which caller shouln't retry.IdcActor.TODO:
outboxrow deletion.API and ABI breaking changes
N/A, additive changes only
Expected complexity level and risk
3.5, satisfying exactly-one semantic could be tricky and should be thoroughly reviewed.
Testing
call_from_databaseapi.