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

PEPPER-1413 delay the shutdown to give the db more time #2876

Merged
merged 1 commit into from
May 28, 2024

Conversation

zyme
Copy link
Contributor

@zyme zyme commented May 28, 2024

PEPPER-1413 Quick experiment: delay the shutdown to give the db more time to clear connections ahead of starting up replacement instance. At present, dsm test is starting up, but spark fails to initialize and reports that it's not possible to create a database connection.

One hypothesis is that because ah/stop now returns almost immediately, that a subsequent instance starting up attempts to create a connection pool before the shutting down instance fully releases its connections. This PR is an experiment to gather more information about the timing.

Note that this PR merges into the test branch, not develop, so that we can try things out in the test environment.

…ections ahead of starting up replacement instance.
@@ -78,7 +78,7 @@ public static void startSparkServer(AppEngineShutdown stopRouteCallback, Config
// as a failure
if (numShutdownAttempts == 0) {
final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
executor.schedule(() -> stopRouteCallback.onAhStop(), 500, TimeUnit.MILLISECONDS);
executor.schedule(() -> stopRouteCallback.onAhStop(), 5, TimeUnit.SECONDS);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going from half a second to 5 seconds.

@zyme zyme requested a review from pegahtah May 28, 2024 16:12
@zyme zyme merged commit 9f0f45e into dsm_test May 28, 2024
4 of 5 checks passed
@zyme zyme deleted the dsm_hotfix_test_shutdown_pool branch May 28, 2024 16:14
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.

2 participants