-
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
Add a domain cluster filter during replication #4069
Conversation
97974c8
to
e0507f7
Compare
Pull Request Test Coverage Report for Build aa4a66e4-8655-4a62-be0b-fd31c3e1a40c
💛 - Coveralls |
@@ -155,14 +156,23 @@ func (t *taskAckManagerImpl) GetTasks( | |||
readLevel := lastReadTaskID | |||
TaskInfoLoop: | |||
for _, taskInfo := range taskInfoList { | |||
// filter task info by domain clusters. | |||
domainEntity, err := t.shard.GetDomainCache().GetDomainByID(taskInfo.GetDomainID()) |
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.
do we assume here the domain from the db is always in the cache?
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. Domains are always in cache
@@ -614,6 +624,15 @@ func (t *taskAckManagerImpl) generateHistoryReplicationTask( | |||
) | |||
} | |||
|
|||
func skipTask(pollingCluster string, domainEntity *cache.DomainCacheEntry) bool { | |||
for _, cluster := range domainEntity.GetReplicationConfig().Clusters { |
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.
idem
09148e9
to
4afae88
Compare
11f8cf2
to
7363573
Compare
What changed?
Add a domain cluster filter during replication
Why?
Save one DB call to fetch workflow history in replication
How did you test it?
Unit tests
Potential risks
N/A