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
Introduce pull based replicator that does not use kafka #2377
Conversation
client/frontend/client.go
Outdated
@@ -643,3 +643,18 @@ func (c *clientImpl) getRandomClient() (workflowserviceclient.Interface, error) | |||
|
|||
return client.(workflowserviceclient.Interface), nil | |||
} | |||
|
|||
func (c *clientImpl) GetReplicationTasks( |
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.
suggestion: GetReplicationTasks
-> GetReplicationMessages
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.
Thanks. I need lots of suggestion on names. Please keep them coming :)
@@ -246,6 +255,14 @@ type ( | |||
RPCAddress string `yaml:"rpcAddress"` | |||
} | |||
|
|||
// ReplicationConsumerConfig contains config for replication consumer | |||
ReplicationConsumerConfig struct { |
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.
are we going to officially support 2 means to deliver replication messages?
I hope not
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 don't think we need to support both. This is mainly for migration and testing purpose. Once we migrate to the new model we can completely remove kafka related stuffs.
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.
then i guess, the preference is to use dynamic config, not this.
@@ -23,6 +23,7 @@ package history | |||
import ( | |||
"context" | |||
"fmt" | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -21,6 +21,7 @@ | |||
package history | |||
|
|||
import ( | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -21,6 +21,7 @@ | |||
package history | |||
|
|||
import ( | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -21,6 +21,7 @@ | |||
package history | |||
|
|||
import ( | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -22,6 +22,7 @@ package history | |||
|
|||
import ( | |||
"fmt" | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -22,6 +22,7 @@ package history | |||
|
|||
import ( | |||
"errors" | |||
"github.com/golang/mock/gomock" |
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.
fmt
token: &r.ReplicationToken{ShardID: common.Int32Ptr(int32(p.shard.GetShardID())), TaskID: common.Int64Ptr(p.readLevel)}, | ||
token: &r.ReplicationToken{ | ||
ShardID: common.Int32Ptr(int32(p.shard.GetShardID())), | ||
LastRetrivedMessageId: common.Int64Ptr(p.lastProcessedMessageID), |
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.
lastRetrievedMessageID
@@ -23,6 +23,7 @@ package history | |||
import ( | |||
ctx "context" | |||
"errors" | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -24,6 +24,7 @@ import ( | |||
"context" | |||
"encoding/json" | |||
"errors" | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -22,6 +22,7 @@ package history | |||
|
|||
import ( | |||
"context" | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -24,6 +24,7 @@ import ( | |||
"context" | |||
"encoding/json" | |||
"errors" | |||
"github.com/golang/mock/gomock" |
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.
fmt
@@ -21,6 +21,7 @@ | |||
package history | |||
|
|||
import ( | |||
"github.com/golang/mock/gomock" |
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.
fmt
Domain replication is still going through kafka, which will be addressed in a follow up PR.