-
Notifications
You must be signed in to change notification settings - Fork 720
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
mcs: change the get member return value #7819
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -413,7 +413,17 @@ func (s *Server) startServer() (err error) { | |
// different service modes provided by the same pd-server binary | ||
bs.ServerInfoGauge.WithLabelValues(versioninfo.PDReleaseVersion, versioninfo.PDGitHash).Set(float64(time.Now().Unix())) | ||
bs.ServerMaxProcsGauge.Set(float64(runtime.GOMAXPROCS(0))) | ||
s.serviceID = &discovery.ServiceRegistryEntry{ServiceAddr: s.cfg.AdvertiseListenAddr} | ||
deployPath, err := os.Executable() | ||
if err != nil { | ||
deployPath = "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to add a log about it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe later if needed |
||
} | ||
s.serviceID = &discovery.ServiceRegistryEntry{ | ||
ServiceAddr: s.cfg.AdvertiseListenAddr, | ||
Version: versioninfo.PDReleaseVersion, | ||
GitHash: versioninfo.PDGitHash, | ||
DeployPath: deployPath, | ||
StartTimestamp: s.StartTimestamp(), | ||
} | ||
uniqueName := s.cfg.GetAdvertiseListenAddr() | ||
uniqueID := memberutil.GenerateUniqueID(uniqueName) | ||
log.Info("joining primary election", zap.String("participant-name", uniqueName), zap.Uint64("participant-id", uniqueID)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -368,7 +368,17 @@ func (s *Server) startServer() (err error) { | |
s.serverLoopCtx, s.serverLoopCancel = context.WithCancel(s.Context()) | ||
legacySvcRootPath := endpoint.LegacyRootPath(s.clusterID) | ||
tsoSvcRootPath := endpoint.TSOSvcRootPath(s.clusterID) | ||
s.serviceID = &discovery.ServiceRegistryEntry{ServiceAddr: s.cfg.AdvertiseListenAddr} | ||
deployPath, err := os.Executable() | ||
if err != nil { | ||
deployPath = "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
} | ||
s.serviceID = &discovery.ServiceRegistryEntry{ | ||
ServiceAddr: s.cfg.AdvertiseListenAddr, | ||
Version: versioninfo.PDReleaseVersion, | ||
GitHash: versioninfo.PDGitHash, | ||
DeployPath: deployPath, | ||
StartTimestamp: s.StartTimestamp(), | ||
} | ||
s.keyspaceGroupManager = tso.NewKeyspaceGroupManager( | ||
s.serverLoopCtx, s.serviceID, s.GetClient(), s.GetHTTPClient(), s.cfg.AdvertiseListenAddr, | ||
discovery.TSOPath(s.clusterID), legacySvcRootPath, tsoSvcRootPath, s.cfg) | ||
|
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.
ServiceRegistryEntry and MicroServiceMember should be always the same? We need to add some comments to avoid inconsistent after late modification.
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.
make their name unified