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

server,testutils: ensure server start is friendly to async cancellation #63031

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

knz
Copy link
Contributor

@knz knz commented Apr 2, 2021

This commit ensures that the server Start() method is properly
sensitive to its context cancellation and possible async interruption
by its stopper.

Intended to help with #62435.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

This commit ensures that the server Start() method is properly
sensitive to its context cancellation and possible async interruption
by its stopper.

Release note: None
@knz knz force-pushed the 20210402-server-init branch from cc8140c to cb250ee Compare April 2, 2021 18:39
@knz knz requested review from irfansharif and otan April 2, 2021 18:39
@knz knz marked this pull request as ready for review April 2, 2021 18:39
@knz knz requested a review from a team as a code owner April 2, 2021 18:39
craig bot pushed a commit that referenced this pull request Apr 5, 2021
63057: cli/demo: refactor the server initialization code r=otan a=knz

First commit from #63031. 
This work was requested by @ajstorm to support completion of #62435

The latency simulation code needs to be injected as a latency map
while the servers are initialized, i.e. concurrently with server
startup.

The previous initialization code for `cockroach demo` to achieve this
was exceedly difficult to understand and was, in fact, incorrect.

This commit reworks this code by exposing the overall workings
as a comment and then ensuring the structure of the comment follows
the explanation. It also add logging.

Additionally, this change ensures that the same initialization code is
used regardless of whether latency simulation is requested or not.

Release note: None

Co-authored-by: Raphael 'kena' Poss <[email protected]>
@craig craig bot merged commit cb250ee into cockroachdb:master Apr 5, 2021
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