-
Notifications
You must be signed in to change notification settings - Fork 805
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
Support for generating replication task on workflow execution updates #624
Support for generating replication task on workflow execution updates #624
Conversation
@@ -0,0 +1,114 @@ | |||
// Copyright (c) 2017 Uber Technologies, Inc. |
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.
since metadataTestBase.go is provided, this mock does not do much, is it?
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'm using it in some unit test to assert IsGlobalDomain API.
looks like we have a dedicated replication task queue, does that means each host will start additional # of shard of go routine for acking & processing replication task? |
History engine changes to generate replication task when IsGlobalDomain is enabled. MutableStateBuilder is also updated to load replication state for the domain and have support for creating replication task on updates along with relevant updates to mutable state. Replication tasks are written to a separate queue for the shard. This requires persistence changes to write replication tasks on updates in the same transaction and new API for reading and completing the task. New AckLevel is needed for processing of replication tasks. This requires changes to shard crud on the persistence layer for reading and writing the new ack level for replication task processing. ClusterMetadata and MessagingClient are already exposed on the Service. So passing through Service to all layers in History service which needs access to both ClusterMetadata and MessagingClient.
// Types of replication tasks | ||
const ( | ||
ReplicationTaskTypeHistory = iota | ||
ReplicationTaskTypeHeartbeat |
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.
is ReplicationTaskTypeHeartbeat in the next PR?
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.
Yes. This is for future purpose.
8430eae
to
9902709
Compare
History engine changes to generate replication task when IsGlobalDomain
is enabled. MutableStateBuilder is also updated to load replication
state for the domain and have support for creating replication task on
updates along with relevant updates to mutable state.
Replication tasks are written to a separate queue for the shard. This
requires persistence changes to write replication tasks on updates in
the same transaction and new API for reading and completing the task.
New AckLevel is needed for processing of replication tasks. This
requires changes to shard crud on the persistence layer for reading and
writing the new ack level for replication task processing.
ClusterMetadata and MessagingClient are already exposed on the Service.
So passing through Service to all layers in History service which needs
access to both ClusterMetadata and MessagingClient.