Skip to content

Harden feature cleanup after database startup failure - #73

Merged
remdui merged 5 commits into
mainfrom
fix/database-startup-failure-handling
Jul 27, 2026
Merged

Harden feature cleanup after database startup failure#73
remdui merged 5 commits into
mainfrom
fix/database-startup-failure-handling

Conversation

@remdui

@remdui remdui commented Jul 27, 2026

Copy link
Copy Markdown
Member

What changed

  • Make Nametags cleanup safe when initialization fails before NametagManager exists.
  • Replace generic empty-Optional NoSuchElementException failures with explicit ORM startup errors for ChatLog, CommandLogger, Glow, Nametags, and Sanctions.
  • Preserve the framework's existing failure cleanup: failed features unregister listeners, commands, tasks, services, ORM contexts, and DataProvider scopes.

Root cause

The DataProvider access-policy failure stopped ORM-backed features during initialization. Nametags then dereferenced a null manager during partial cleanup, obscuring the primary failure and contributing to the secondary async Log4j rendering error.

Impact

  • Partial initialization no longer creates a cleanup NPE.
  • Database startup failures now identify the affected feature and required MYSQL/player_data_rw connection.
  • The primary authorization fix remains Fix Paper shared connection access before plugin enable DataProvider#14; this PR makes ServerFeatures fail cleanly and diagnostically if database setup is unavailable for any other reason.

@remdui
remdui merged commit dc7974c into main Jul 27, 2026
7 checks passed
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.

1 participant