cockroachdb / cockroach-go

Packages for go clients.
Apache License 2.0
159 stars 70 forks source link

Allow non-hardcoded ports for multinode cluster #167

Closed rafiss closed 1 year ago

rafiss commented 1 year ago

This required the join and init args to be computed on the fly, since we can no longer infer them until after a node has started.

informs https://github.com/cockroachdb/cockroach/issues/98549 informs https://github.com/cockroachdb/cockroach/issues/98612 informs https://github.com/cockroachdb/cockroach/issues/98594

cockroach-teamcity commented 1 year ago

This change is Reviewable

ZhouXing19 commented 1 year ago

testserver/testservernode.go line 127 at r1 (raw file):

  err := currCmd.Start()
  if currCmd.Process != nil {
      log.Printf("process %d started: %s", currCmd.Process.Pid, strings.Join(args, " "))

Should we also include the env vars in the log?

ZhouXing19 commented 1 year ago

testserver/testservernode.go line 74 at r1 (raw file):

Previously, ZhouXing19 (Jane Xing) wrote…
nit: might be helpful for future debugging if we can log something here And should we also retry connecting to this node?

nvm I just saw the log in the if currCmd.Process != nil {} below

ZhouXing19 commented 1 year ago

testserver/testservernode.go line 78 at r1 (raw file):

Previously, ZhouXing19 (Jane Xing) wrote…
nit: can we add a log after exiting the loop, just to show eventually what nodes are going to be joined? or maybe more generally just print out the whole `startCmd` right before executing it. Just for the debugging purpose.

ditto, just saw the log below

rafiss commented 1 year ago

tftrs!