Skip to content

fix(core): Windows/Clang build, merge free pages after rollback, shell, warnings#185

Open
vkozio wants to merge 4 commits intoLadybugDB:masterfrom
vkozio:feat-core-build-win
Open

fix(core): Windows/Clang build, merge free pages after rollback, shell, warnings#185
vkozio wants to merge 4 commits intoLadybugDB:masterfrom
vkozio:feat-core-build-win

Conversation

@vkozio
Copy link

@vkozio vkozio commented Feb 18, 2026

Summary

  • Windows/Clang build fixes (LNK4217, AMD64 for winnt.h).
  • Merge free pages after rollback (stability), integrated from Kuzu 95aac1c14b with attribution.
  • Shell CMake and warning cleanups in core.

Motivation

Fix core build on Windows with Clang; fix rollback/storage correctness; reduce warnings.

Changes

  • CMakeLists.txt, cmake/templates/system_config.h.in, src/CMakeLists.txt.
  • src/storage: free_space_manager, page_manager, local_storage (merge free pages).
  • src/main: client_context, connection. src/common/file_system, cast_helpers, arithmetic/cast headers, rel_batch_insert.
  • tools/shell: CMakeLists. .gitignore, AGENTS.md.

Attribution

- ClientContext: add activeQueryCount, mtxForClose, cvForClose;
  registerQueryStart(), registerQueryEnd(), waitForNoActiveQuery().
- QueryProcessor::execute(): guard with registerQueryStart/End (RAII)
  so end is always called on exception.
- Connection::~Connection(): call waitForNoActiveQuery() before
  setting preventTransactionRollbackOnDestruction and destroying
  clientContext.

Avoids SIGSEGV when Connection is closed while workers still
reference ClientContext (e.g. after TransactionManagerException
during COPY or async close in Node addon).
…oint timeout

- In ~Connection(), after waitForNoActiveQuery(), call transactionManager->rollback()
  when there is an active transaction, then set preventTransactionRollbackOnDestruction.
- Ensures the transaction is removed from TransactionManager so Database::~Database()
  checkpoint does not time out (e.g. in PrivateApiTest.CloseConnectionWithActiveTransaction).
- Add incident doc docs/incidents/2026-02-17-minimal-test-checkpoint-timeout.md (Resolved).
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