Skip to content

[DataMapper] Provide Pool of data mappers#447

Open
Yaraslaut wants to merge 2 commits intomasterfrom
feature/datamapper_pool
Open

[DataMapper] Provide Pool of data mappers#447
Yaraslaut wants to merge 2 commits intomasterfrom
feature/datamapper_pool

Conversation

@Yaraslaut
Copy link
Member

Closes #432

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a DataMapper pool feature to provide efficient reuse of DataMapper instances across threads. The implementation supports three growth strategies (UnboundedGrow, BoundedWait, and BoundedOverflow) that can be configured at compile time, along with a global singleton pool accessible via GlobalDataMapperPool().

Changes:

  • Adds a template-based Pool class with RAII wrapper PooledDataMapper for automatic resource management
  • Implements three configurable growth strategies for different use cases
  • Provides CMake configuration options for pool sizing and growth strategy
  • Adds comprehensive unit tests covering all strategies and concurrent usage scenarios

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/Lightweight/DataMapper/Pool.hpp Core pool implementation with template-based configuration and strategy pattern
src/Lightweight/DataMapper/Pool.cpp Global singleton pool implementation
src/Lightweight/Lightweight.hpp Exposes Pool.hpp in public API
src/Lightweight/CMakeLists.txt Adds CMake configuration options and compile definitions for pool settings
src/tests/DataMapper/AsynchronousTests.cpp Adds comprehensive tests for all pool strategies and concurrent usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@christianparpart christianparpart left a comment

Choose a reason for hiding this comment

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

Documentation is missing on every public type and member. This has an impact also on our documentation website.

@Yaraslaut
Copy link
Member Author

Added documentation

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 15 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Yaraslaut Yaraslaut force-pushed the feature/datamapper_pool branch 2 times, most recently from 6199e47 to ace590d Compare February 15, 2026 16:00
@Yaraslaut Yaraslaut force-pushed the feature/datamapper_pool branch from ace590d to bdd471e Compare February 15, 2026 18:33
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.

DataMapper Pool

2 participants