Skip to content

Commit

Permalink
cli/demo: refactor the server initialization
Browse files Browse the repository at this point in the history
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]>
Co-authored-by: Oliver Tan <[email protected]>
  • Loading branch information
knz and otan committed Apr 3, 2021
1 parent cb250ee commit 19e670f
Show file tree
Hide file tree
Showing 4 changed files with 433 additions and 155 deletions.
Loading

0 comments on commit 19e670f

Please sign in to comment.