generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Context
GitHub Reference: logger.py#L45
There is a logger on DurableContext. Currently the logger will always log, even on replay. Amend this logger so it uses the current execution state to compare existing checkpoints to the current logger.
Implementation Notes
ctx.logger.log('first log')
ctx.step('step1')
ctx.logger.log('2nd log')
ctx.step('step2')In each context keep track of which operations you have "visited".
During replay, "step 1" should be in the execution state.
If you have "step 1" exists, but you haven't run the ctx.step line that created it, this must be a replay.
Once all operations in a context are crossed, it is no longer replay and executing new code.
This works because all operations must be created linearly (for deterministic step ids), and we require child contexts for concurrency.
Acceptance Criteria
- Only log on replay for the default logger
- Provide a way for custom loggers to take advantage of the same replay checks
Priority: Low
Estimated Effort: 3 days
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels