Skip to content

fix(mdbx): report initialization failures#115

Merged
NewYaroslav merged 4 commits into
mainfrom
fix/mdbx-logger-init-errors
Jun 1, 2026
Merged

fix(mdbx): report initialization failures#115
NewYaroslav merged 4 commits into
mainfrom
fix/mdbx-logger-init-errors

Conversation

@NewYaroslav

@NewYaroslav NewYaroslav commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • wrap MdbxLogger initialization to report constructor-time failures through Config::on_error before rethrowing
  • explicitly ensure the MDBX file parent directory is created for writable no_subdir storage
  • cover nested parent creation and initialization failure callback/rethrow behavior
  • update mdbx-containers submodule to 095e46c for the latest path handling fixes

Verification

  • cmake -S . -B build-mdbx-test -G "MinGW Makefiles" -DLOGIT_CPP_BUILD_TESTS=ON -DLOGIT_WITH_MDBX=ON -DLOGIT_USE_SUBMODULES=ON
  • cmake --build build-mdbx-test --target mdbx_logger_test -j2
  • ctest --test-dir build-mdbx-test -R mdbx_logger_test --output-on-failure
  • git diff --check -- include/logit_cpp/logit/loggers/MdbxLogger.hpp tests/mdbx_logger_test.cpp
  • after submodule update: configure/build/ctest -R mdbx_logger_test returned VERIFY_OK

🤖 Generated with Claude Code

NewYaroslav and others added 4 commits June 1, 2026 13:37
Notify the configured error callback for constructor-time storage failures so logger registration can surface the cause before the exception prevents a broken backend from being added.

Constraint: Keep MdbxLogger C++17-compatible and preserve constructor rethrow semantics

Confidence: high

Scope-risk: narrow

Not-tested: Full test suite; only mdbx_logger_test was run

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Use filesystem path decomposition in the init failure regression test so the blocker path follows the same path semantics as the nested MDBX path under test.

Constraint: Keep the change limited to test robustness

Confidence: high

Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Keep the MDBX regression test self-contained for pre-C++17 parses even though the MDBX backend is configured as C++17-only.

Constraint: Preserve current CMake LOGIT_WITH_MDBX C++17 requirement

Confidence: high

Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull the latest mdbx-containers fixes into the MDBX logger initialization PR so path handling uses the updated dependency behavior.

Constraint: Keep unrelated local guide edits out of this PR update

Confidence: high

Scope-risk: narrow

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@NewYaroslav NewYaroslav merged commit a802b71 into main Jun 1, 2026
13 checks passed
@NewYaroslav NewYaroslav deleted the fix/mdbx-logger-init-errors branch June 3, 2026 00:04
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