-
Notifications
You must be signed in to change notification settings - Fork 99
ContextId refactor #8119
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
base: staging
Are you sure you want to change the base?
ContextId refactor #8119
Conversation
} | ||
|
||
case class ContextId(value: String) | ||
case class ContextId( |
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.
This refactor separates constituent parts of the ContextId, but essentially it does not change this structure. Should we go in any particular direction? J suggested adding some displayableName.
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 think that we shouldn't strictly assume restriction that ContextId
should be exactly the same as before change. Instead, we should think what parts where necessary to provide the current identity behaviour and extract them. We should avoid magical parts:
prefix
: did you find some places where it was something different than scenarioName? If, so, maybe we have two separate parts: scenarioName + optional sth elsenodeId
: let's make it even more explicit.nodeId
was added to easily provide identity between context generated by different nodes. Let's call it e.g.originatingNodeId
suffix
: I assume that it was used in places where new context was generated and neither taskId nor node id was sufficient? can you give some examples?index
was used in for-each or other contexts?
With regards to displayableName
, IMO we should easily change presentation so I think that we shouldn't provide this and make FE decide how to display these information.
@@ -65,4 +67,37 @@ object RowConversions { | |||
|
|||
} | |||
|
|||
private implicit def contextIdCodec: Codec[ContextId] = |
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 use the circe codec here, and keep the contextId in the single String field, as before. The reason is that we may need to further modify ContextId representation, without making multiple (very) problematic changes in the Flink serialization. But at the same time I am not sure if we are supposed to use circe in this context - whether it will have impact on performance.
Describe your changes
Changes:
Checklist before merge