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 explicit startup/shutdown order for development servers #5459

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

dnr
Copy link
Member

@dnr dnr commented Feb 28, 2024

What changed?

Instead of starting all services in one process in parallel, serialize the startup in a defined order, and the shutdown in the reverse order.

Why?

This reduces noisy error logs during both startup and shutdown.

I originally thought that serializing startup would be vulnerable to the problem fixed in #3100 but I couldn't reproduce it after a bunch of testing, so I think some other change in between must have also addressed that. If that problem reappears, though, an easy fix would be to start matching and history at the same time, and wait for them before moving on to frontend.

How did you test it?

local server startup/shutdown

Potential risks

Generally multiple services in one process is only used in development, so this shouldn't have any effect on production.

@dnr dnr requested a review from a team as a code owner February 28, 2024 03:33
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

My approval is a symbolic one, thanks for doing this!

Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

Well that didn't seem so hard!

@dnr dnr merged commit 39ec799 into temporalio:main Feb 28, 2024
58 checks passed
@dnr dnr deleted the logspam1 branch February 28, 2024 22:19
stephanos pushed a commit to stephanos/temporal that referenced this pull request Mar 21, 2024
…io#5459)

## What changed?
Instead of starting all services in one process in parallel, serialize
the startup in a defined order, and the shutdown in the reverse order.

## Why?
This reduces noisy error logs during both startup and shutdown.

I originally thought that serializing startup would be vulnerable to the
problem fixed in temporalio#3100 but I couldn't reproduce it after a bunch of
testing, so I think some other change in between must have also
addressed that. If that problem reappears, though, an easy fix would be
to start matching and history at the same time, and wait for them before
moving on to frontend.

## How did you test it?
local server startup/shutdown

## Potential risks
Generally multiple services in one process is only used in development,
so this shouldn't have any effect on production.
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.

4 participants