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

Support for generating replication task on workflow execution updates #624

Merged
merged 3 commits into from
Mar 21, 2018

Conversation

samarabbas
Copy link
Contributor

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.

@@ -0,0 +1,114 @@
// Copyright (c) 2017 Uber Technologies, Inc.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@wxing1292
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 63.998% when pulling e454c14 on samarabbas:xdc-replicate-events into 93a5728 on uber:master.

@samarabbas samarabbas merged commit f5ebfea into cadence-workflow:master Mar 21, 2018
@samarabbas samarabbas deleted the xdc-replicate-events branch March 21, 2018 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants