Skip to content

Conversation

markuspf
Copy link
Contributor

@markuspf markuspf commented Sep 2, 2025

If an error happens during ApplicationServer::start(), the function attempts to shutdown all previously started features.

During startup only the enabled features are started, non-enabled features are skipped.

The shutdown loop was missing the code skipping non-enabled features and hence ran into an `ADB_PROD_ASSERT.

Testing the above fix I also found that the server is not put into the correct state when stopping and unpreparing features, so that code is added, too.

Scope & Purpose

(Please describe the changes in this PR for reviewers, motivation, rationale - mandatory)

  • 💩 Bugfix
  • 🍕 New feature
  • 🔥 Performance improvement
  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.12.0: (Please link PR)
    • Backport for 3.11: (Please link PR)
    • Backport for 3.10: (Please link PR)

Related Information

(Please reference tickets / specification / other PRs etc)

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

Copy link

cla-bot bot commented Sep 2, 2025

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Markus Pfeiffer.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@markuspf markuspf force-pushed the bug-fix/bts-2217-skip-non-enabled-features-on-shutdown branch from 3bee31c to 8775f53 Compare September 2, 2025 14:28
Copy link

cla-bot bot commented Sep 2, 2025

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Markus Pfeiffer.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@markuspf markuspf force-pushed the bug-fix/bts-2217-skip-non-enabled-features-on-shutdown branch from 8775f53 to d7d07b3 Compare September 2, 2025 14:30
Copy link

cla-bot bot commented Sep 2, 2025

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Markus Pfeiffer.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@markuspf markuspf force-pushed the bug-fix/bts-2217-skip-non-enabled-features-on-shutdown branch from d7d07b3 to fd48100 Compare September 2, 2025 14:32
@cla-bot cla-bot bot added the cla-signed label Sep 2, 2025
@markuspf markuspf changed the title Fix BTS-2217 (Attempting to STOP a non-started feature) [BTS-2217] Attempting to STOP a non-started feature Sep 2, 2025
@markuspf markuspf self-assigned this Sep 2, 2025
@markuspf markuspf added this to the 3.12.6 milestone Sep 2, 2025
@markuspf
Copy link
Contributor Author

markuspf commented Sep 3, 2025

As a point of reference, the feature that caused this kerfuffle is the DocumentStateMachine which is part of Replication2, which means that the code is still around, intentional or not.

The bug fixed is a genuine bug in the startup/shutdown code, though, so this fix should go in regardless.

Copy link
Contributor

@jvolmer jvolmer left a comment

Choose a reason for hiding this comment

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

LGTM

If an error happens during ApplicationServer::start(), the function
attempts to shutdown all previously started features.

During startup only the enabled features are started, non-enabled
features are skipped.

The shutdown loop was missing the code skipping non-enabled features
and hence ran into an ADB_PROD_ASSERT.
@markuspf markuspf force-pushed the bug-fix/bts-2217-skip-non-enabled-features-on-shutdown branch from 17e2404 to 7775b20 Compare September 4, 2025 13:24
Copy link
Contributor

@jvolmer jvolmer left a comment

Choose a reason for hiding this comment

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

looks still good to me :)

@neunhoef neunhoef merged commit 7e1a6b8 into devel Sep 4, 2025
5 checks passed
@neunhoef neunhoef deleted the bug-fix/bts-2217-skip-non-enabled-features-on-shutdown branch September 4, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants