Conversation
docs/design.md
Outdated
|
|
||
| `ExecutionManager` tracks whether we're replaying completed operations or executing new ones via `ExecutionMode`: | ||
|
|
||
| - **REPLAY**: Started with if `operations.size() > 1` (has checkpointed operations beyond the initial EXECUTION op) |
There was a problem hiding this comment.
Does this check cover all the scenarios? Python SDK has a method for the same purpose but the condition is much more complex than this https://github.com/aws/aws-durable-execution-sdk-python/blob/afd40835f66a4d2267d4397031cb115e6556f65c/src/aws_durable_execution_sdk_python/state.py#L293-L324
There was a problem hiding this comment.
I used the approach that the TS SDK is following:
https://github.com/aws/aws-durable-execution-sdk-js/blob/155c5b88e4419b554039b5869666815d731ba7e6/packages/aws-durable-execution-sdk-js/src/context/execution-context/execution-context.ts#L61-L64
There was a problem hiding this comment.
This is just for setting the initial REPLAY state. We do have another method that checks for transitioning back to new in getOperationAndUpdateReplayState - similar how the Python SDK does it. But Python is also checking for Status - which TS is not doing: https://github.com/aws/aws-durable-execution-sdk-js/blob/155c5b88e4419b554039b5869666815d731ba7e6/packages/aws-durable-execution-sdk-js/src/context/durable-context/durable-context.ts#L209
There was a problem hiding this comment.
Changed to include terminal state. Please take a look @zhongkechen
There was a problem hiding this comment.
Awesome work @maschnetwork. Just left a few smaller comments below.
It is not clear to me when we use .trace() vs. .debug() now in our library code.
sdk/src/main/java/com/amazonaws/lambda/durable/execution/ExecutionManager.java
Outdated
Show resolved
Hide resolved
sdk/src/main/java/com/amazonaws/lambda/durable/execution/ExecutionManager.java
Show resolved
Hide resolved
sdk/src/main/java/com/amazonaws/lambda/durable/execution/ExecutionManager.java
Outdated
Show resolved
Hide resolved
sdk/src/test/java/com/amazonaws/lambda/durable/logging/DurableLoggerTest.java
Outdated
Show resolved
Hide resolved
sdk/src/main/java/com/amazonaws/lambda/durable/execution/ExecutionManager.java
Show resolved
Hide resolved
examples/src/main/java/com/amazonaws/lambda/durable/examples/LoggingExample.java
Show resolved
Hide resolved
Addressed review comments in latest commit. |
sdk/src/main/java/com/amazonaws/lambda/durable/execution/ExecutionManager.java
Outdated
Show resolved
Hide resolved
sdk/src/main/java/com/amazonaws/lambda/durable/logging/DurableLogger.java
Show resolved
Hide resolved
|
@phipag and @zhongkechen updated the PR to:
|
phipag
left a comment
There was a problem hiding this comment.
Awesome! I like the way we were able to simplify!
sdk/src/main/java/com/amazonaws/lambda/durable/execution/ExecutionManager.java
Show resolved
Hide resolved
sdk/src/main/java/com/amazonaws/lambda/durable/operation/StepOperation.java
Outdated
Show resolved
Hide resolved
|
A general comment: Should we consider updating all example to use |
Yes but lets update the samples in a separate PR and also once your thread naming is merged. Please check if there are any remaining issues from your side before merging. |
phipag
left a comment
There was a problem hiding this comment.
Final changes. Everything else looks good!
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
#4
Description
Checklist
Testing
Unit Tests
Yes
Integration Tests
Yes
Examples
Yes