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

Use named port to select transport for outbound calls #4749

Merged
merged 16 commits into from
Mar 3, 2022

Conversation

mantas-sidlauskas
Copy link
Contributor

@mantas-sidlauskas mantas-sidlauskas commented Feb 23, 2022

What changed?
AddressMapper is changed to named port setting.

Some additional changes in this PR:

  • CreateShardOwnershipLostError is returning TChannel address for backwards compatibility
  • LookupByAddress returns membership.HostInfo which is handy to find peer based on IP:port without knowing transport details
  • Use zaptest as logger in unit tests

Why?
Named port (tchannel or grpc) will now define what transport is to be used for outbound calls.

How did you test it?
Unit tests, integration tests

Potential risks

Release notes

Documentation Changes

@mantas-sidlauskas mantas-sidlauskas marked this pull request as draft February 23, 2022 14:57
@mantas-sidlauskas mantas-sidlauskas changed the title checkpoint Use named port to select transport for clients Feb 23, 2022
@coveralls
Copy link

coveralls commented Feb 28, 2022

Pull Request Test Coverage Report for Build 59d8203a-4cbd-4467-b391-6c762d541078

  • 131 of 171 (76.61%) changed or added relevant lines in 14 files are covered.
  • 36 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.03%) to 56.824%

Changes Missing Coverage Covered Lines Changed/Added Lines %
client/history/peerResolver.go 6 7 85.71%
common/membership/hostinfo.go 25 26 96.15%
cmd/server/cadence/server.go 0 2 0.0%
host/membership_resolver.go 9 12 75.0%
common/peerprovider/ringpopprovider/provider.go 0 4 0.0%
service/history/handler.go 0 6 0.0%
common/membership/resolver.go 0 10 0.0%
host/onebox.go 55 68 80.88%
Files with Coverage Reduction New Missed Lines %
client/history/client.go 2 39.33%
client/history/metricClient.go 2 46.37%
common/membership/hashring.go 2 83.54%
common/peerprovider/ringpopprovider/config.go 2 81.58%
common/peerprovider/ringpopprovider/provider.go 2 0%
common/task/weightedRoundRobinTaskScheduler.go 2 88.6%
service/history/handler.go 2 48.72%
common/cache/lru.go 3 90.73%
common/log/tag/tags.go 3 51.22%
common/task/fifoTaskScheduler.go 3 84.54%
Totals Coverage Status
Change from base Build 43de9000-0634-408f-b6fb-9a22dea6c19b: 0.03%
Covered Lines: 83435
Relevant Lines: 146831

💛 - Coveralls

@mantas-sidlauskas mantas-sidlauskas changed the title Use named port to select transport for clients Use named port to select transport for outbound calls Feb 28, 2022
@mantas-sidlauskas mantas-sidlauskas marked this pull request as ready for review February 28, 2022 18:18
@mantas-sidlauskas mantas-sidlauskas requested a review from a team February 28, 2022 18:21
host/onebox.go Outdated Show resolved Hide resolved
return m, nil
}
}
return membership.HostInfo{}, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, shouldn't his return an error? Loop is finished but host not found yet.

host/membership_hashring.go Outdated Show resolved Hide resolved
client/matching/peerResolver.go Outdated Show resolved Hide resolved
common/membership/hostinfo.go Outdated Show resolved Hide resolved
common/membership/hostinfo.go Outdated Show resolved Hide resolved
common/rpc/factory.go Outdated Show resolved Hide resolved
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