-
Notifications
You must be signed in to change notification settings - Fork 98
[fix] Default journal_retention to zero when reading old invoker effects #3451
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
Conversation
This fixes a bug where restate v1.4.0 would fail to deserialize old invoker effects from bifrost. Example error: ``` 2025-06-24T10:51:30.432763Z ERROR run: restate_types::storage::decode: Flexbuffers error at field command.InvokerEffect.kind.JournalEntryV2.entry.inner.Command.command_specific_metadata.CallOrSend err=command.InvokerEffect.kind.JournalEntryV2.entry.inner.Command.command_specific_metadata.CallOrSend: Serde Error: missing field `journal_retention_duration` partition_id=5 2025-06-24T10:51:30.432772Z ERROR run: restate_wal_protocol::envelope: FlexbuffersSerde decode failure (decoding Envelope) err=decoding failed: Serde Error: missing field `journal_retention_duration` partition_id=5 2025-06-24T10:51:30.432788Z WARN run: restate_worker::partition: Shutting partition processor down because of error: decoding failed: Serde Error: missing field `journal_retention_duration` partition_id=5 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for fixing this problem @AhmedSoliman. Defaulting to a 0 duration should be correct. LGTM. +1 for merging.
@@ -175,6 +175,9 @@ pub struct CallOrSendMetadata { | |||
pub invocation_target: InvocationTarget, | |||
pub span_context: ServiceInvocationSpanContext, | |||
pub completion_retention_duration: Duration, | |||
// Since v1.4.0. Messages older than v1.4.0 will have zero retention as that | |||
// matches the default behaviour of <= 1.3.x. | |||
#[serde(default)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this also needs skip_serializing_if zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flexbuffer serialization should skip unknown fields if I am not mistaken so for this specific encoding format it might not be needed.
This fixes a bug where restate v1.4.0 would fail to deserialize old invoker effects from bifrost.
Example error: