Skip to content
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

CORE-17387 - Flow timeout events. #1272

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "record",
"name": "FlowTimeout",
"namespace": "net.corda.data.flow",
"doc": "Represents of a flow timeout instruction.",
"fields": [
{
"name": "checkpointStateKey",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand, this is the flow ID, but I thought maybe it's worth being specific in case this changes/evolves.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think there's no harm in having it.

"type": "string",
"doc": "Key for the state record that is storing the checkpoint."
},
{
"name": "timeoutDateTime",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not strictly necessary but may be useful when troubleshooting or monitoring the system health?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not great in general at using Avro records for this sort of thing, but it does give us a chance to log at the point where we receive the event.

"type": {
"type": "long",
"logicalType": "timestamp-millis"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ private Flow() {
public static final String FLOW_MAPPER_EVENT_STATE_TOPIC = getStateAndEventStateTopic(FLOW_MAPPER_EVENT_TOPIC);
public static final String FLOW_MAPPER_EVENT_DLQ_TOPIC = getDLQTopic(FLOW_MAPPER_EVENT_TOPIC);
public static final String FLOW_MAPPER_CLEANUP_TOPIC = "flow.mapper.cleanup";
public static final String FLOW_TIMEOUT_TOPIC = "flow.timeout";
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,10 @@ topics:
producers:
- flowMapper
config:
FlowTimeoutTopic:
name: flow.timeout
consumers:
- flow
producers:
- flow
config: