Repository navigation
[WIP] Fix CMake alias target error by ensuring proper find_package and target_link_libraries - #2
Merged
makr-code merged 4 commits intoNov 3, 2025
Conversation
- Add link_required() helper function to safely check and link targets - Add defensive check for Boost::system target after find_package - Add defensive checks for opentelemetry-cpp targets before linking - Add comments explaining ZSTD target selection logic - Ensure clear error messages if required targets are missing Co-authored-by: makr-code <[email protected]>
Clarify that the helper function is provided for future use and explain why explicit target checks are used in current code (minimal changes) Co-authored-by: makr-code <[email protected]>
Update function signature to accept visibility (PRIVATE/PUBLIC/INTERFACE) as a required parameter and check all targets including additional ones Co-authored-by: makr-code <[email protected]>
makr-code
marked this pull request as ready for review
November 3, 2025 11:19
makr-code
deleted the
copilot/fix-150588092-1085539157-070cfc4d-b403-4f38-975f-050676113fde
branch
November 30, 2025 11:50
makr-code
added a commit
that referenced
this pull request
Dec 6, 2025
…-070cfc4d-b403-4f38-975f-050676113fde [WIP] Fix CMake alias target error by ensuring proper find_package and target_link_libraries
This was referenced Dec 15, 2025
Copilot AI
added a commit
that referenced
this pull request
Dec 22, 2025
…cksDB 10.6+) Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Jan 5, 2026
…EmbeddedLLM Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Jan 5, 2026
Fixed memory leak where expired cache entries were removed from the map but not from the vector index during query operations. Added vector index cleanup when erasing expired entries in the query path (line 119). This complements the existing cleanup in the eviction path (line 237) and clearExpired() method (line 295). Without this fix: - Expired entries would leak in the vector index - Stale entries could appear in ANN search results - Memory usage would grow unbounded (O(n) leak) - Index performance would degrade over time Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Jan 5, 2026
Created detailed document addressing both minor observations from code review: **Minor Observation #1: Iterator API Lifecycle** Three progressive solutions provided: - Solution 1A: Enhanced documentation (15 min, immediate) - Solution 1B: SafeIterator RAII wrapper (2-3 hrs, recommended) - Solution 1C: Shared pointer DB handle (4-6 hrs, comprehensive) Recommended: Solution 1B (SafeIterator) for next API iteration - RAII-based automatic lifecycle management - Move semantics for safety - Familiar iterator interface - Complete prevention of use-after-free - Clean migration path from old API **Minor Observation #2: Cache Statistics Consistency** Two solutions provided: - Solution 2A: Snapshot-based statistics (1 hr, simple) - Solution 2B: Lock-free atomic with sequence numbers (2-3 hrs, high-perf) Recommended: Keep current behavior (already acceptable) - Only implement 2A if monitoring teams request it - Current eventual consistency is appropriate for stats **Implementation Priority Matrix:** - Immediate: 1A (documentation) - Medium-term: 1B (SafeIterator) - Long-term: Consider 1C only during major refactoring - Optional: 2A if needed, skip 2B **Document Contents:** - Detailed code examples for each solution - Implementation guidelines - Testing recommendations - Migration paths - Effort estimates and risk assessment - 17KB comprehensive reference Status: Optional enhancements - current code is production-ready Co-authored-by: makr-code <[email protected]>
This was referenced Jan 5, 2026
This was referenced Feb 22, 2026
Merged
6 of 16 tasks
Copilot AI
added a commit
that referenced
this pull request
Mar 11, 2026
#2 Co-authored-by: makr-code <[email protected]>
7 tasks
9 of 23 tasks
Copilot AI
added a commit
that referenced
this pull request
Apr 7, 2026
- TODO #1: Add idle-timeout background thread to TumblingWindow and SlidingWindow (idleTimeoutLoop). When no events arrive for idle_timeout duration the watermark is advanced to now minus max_out_of_orderness and expired windows are closed and emitted. Tracks last_event_us_ atomically; thread started only when idle_timeout > 0ms; stopped safely before state teardown. - TODO #2: Store partition_key in TumblingWindow::InternalWindow and SlidingWindow::InternalWindow. Set on window creation from the creating record's partition_key. Propagate to WindowResult in computeResult(). Update SlidingWindow::ensureWindowsExist signature to accept const std::string& partition_key. - TODO #3: Track Session::has_late_records (default false). Set to true whenever a late record (ev_us < wm with allow_late_data) is added to a session in ingest(). Pass to computeResult() in ingest(), flush(), and expiryLoop() so is_late_firing is correctly set on timer-driven and gap-triggered session closures. - TODO #4: Add session_expiry_interval_ms to StreamingWindowPipeline::Config. Update session() factory to accept optional expiry_interval_ms parameter. Forward to SessionWindowConfig::session_expiry_check_interval_ms in build(). - TODO #5: Replace O(N) inner loop in SlidingWindow::ensureWindowsExist and HoppingWindow::ensureWindowsExist with unordered_set<int64_t> window_start_set_ for O(1) duplicate detection. Keep set in sync on window creation and pruning in closeExpiredWindows(). - TODO #7: SessionWindow::computeResult() now accepts bool late = false and sets r.is_late_firing = late. All call-sites in ingest(), flush(), and expiryLoop() pass s.has_late_records. - TODO #8: RESOLVED (no code change needed) — closeExpiredWindows() duplicate results on shutdown. Co-authored-by: Copilot <[email protected]> Co-authored-by: makr-code <[email protected]>
This was referenced Apr 7, 2026
Copilot AI
added a commit
that referenced
this pull request
Apr 13, 2026
…rtifact setup Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/8f62ff42-753e-4969-9f4c-d170fd546c1d Co-authored-by: makr-code <[email protected]>
6 of 25 tasks
makr-code
added a commit
that referenced
this pull request
Apr 13, 2026
…rtifact setup (#4598) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/8f62ff42-753e-4969-9f4c-d170fd546c1d Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Apr 15, 2026
…ics cases - Remove BENCHMARK(BM_OLAP_Disabled) from bench_olap_analytics.cpp (function was undefined; 4 productive cases already present) - Update PERFORMANCE_EXPECTATIONS.md: - Mark Maßnahme #2 as ERLEDIGT in §1.4 table - Add AN-GB/AN-WIN/AN-JOIN/AN-TOPN to §6.1 AN-mapping table - Add 4 new proxy benchmark entries to §6.1.1 - Update §1.3 Analytics row to reflect stub removal - Fix logic bug in perf_expectations_rootcause_audit.py: META_CAUSE_2 now correctly reports OK when real cases exist and disabled stub was removed (previously always FAIL when real cases found) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/013de0bd-e297-4322-b6b5-47a881db022a Co-authored-by: makr-code <[email protected]>
makr-code
added a commit
that referenced
this pull request
Apr 15, 2026
…analytics benchmark cases (#4651) * Initial plan * perf: remove BM_OLAP_Disabled stub, register 4 productive OLAP analytics cases - Remove BENCHMARK(BM_OLAP_Disabled) from bench_olap_analytics.cpp (function was undefined; 4 productive cases already present) - Update PERFORMANCE_EXPECTATIONS.md: - Mark Maßnahme #2 as ERLEDIGT in §1.4 table - Add AN-GB/AN-WIN/AN-JOIN/AN-TOPN to §6.1 AN-mapping table - Add 4 new proxy benchmark entries to §6.1.1 - Update §1.3 Analytics row to reflect stub removal - Fix logic bug in perf_expectations_rootcause_audit.py: META_CAUSE_2 now correctly reports OK when real cases exist and disabled stub was removed (previously always FAIL when real cases found) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/013de0bd-e297-4322-b6b5-47a881db022a Co-authored-by: makr-code <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Apr 15, 2026
…LAP cases, Maßnahme #2) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/245ed4ff-bea4-4ded-8384-920faf893d64 Co-authored-by: makr-code <[email protected]>
Merged
5 of 25 tasks
makr-code
added a commit
that referenced
this pull request
Apr 15, 2026
…OLAP cases now buildable (#4658) * Initial plan * feat(benchmarks): add CMake target for bench_olap_analytics (4 real OLAP cases, Maßnahme #2) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/245ed4ff-bea4-4ded-8384-920faf893d64 Co-authored-by: makr-code <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: makr-code <[email protected]>
11 of 25 tasks
Copilot AI
added a commit
that referenced
this pull request
May 8, 2026
…ry update, MCP StdioReadFn Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/5af5fc0a-679f-4a34-83d1-d92dfd294401 Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
May 26, 2026
…lora_training_service - data_race #1: Replace TOCTOU (load+store) on is_training_ with compare_exchange_strong (atomic claim) - data_race #2-3: Add metrics_mutex_ to protect current_metrics_, loss_history_, current_adapter_id_, training_callback_ in all read/write paths (getMetrics, registerCallback, training loop, saveCheckpoint, loadCheckpoint, GPU callback) - data_race #4-5: Add config_mutex_ to setTrainingConfig, getTrainingConfig, setHyperparameters, getHyperparameters; training loop takes a local Config snapshot at entry so it never races with external callers - data_race #6: Phi-3 detection mutates local_config snapshot only, never touches shared config_ - data_race #7 (GPU): trainWithQuantization GPU callback now writes current_metrics_ and reads training_callback_ under metrics_mutex_ - iterator_invalidation: loss_history_.push_back and saveCheckpoint vector copy both guarded by metrics_mutex_ - no_timeout #1: stopTraining spin-loop replaced with condition_variable wait_for (30 s); on timeout is_training_ force-cleared - no_timeout #2: training thread stores is_training_=false under stop_mutex_ then notify_all for correct happens-before with waiter - tests: add 4 focused concurrency tests (concurrent getMetrics, stop clears flag, concurrent registerCallback, concurrent train serialisation) - docs: update src/llm/MODULE_GAPS.md with W1-L02 gap delta (10 findings resolved) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/12047fc4-4373-4486-9917-d40ec122bea2 Co-authored-by: makr-code <[email protected]>
14 of 57 tasks
Merged
14 of 59 tasks
Copilot AI
added a commit
that referenced
this pull request
Aug 15, 2026
Add comprehensive test suite for Phase 5 C++ safety fixes:
1. test_index_destructor_safety.cpp (338 lines, 10 tests)
- VectorIndexManager destructor exception handling
- GPUVectorIndex destructor exception safety
- Noexcept verification (static_assert)
- HNSW resource cleanup validation
- Tests: destructor no-throw, exception during shutdown, stack unwinding,
multiple calls, concurrent destruction, GPU variants
2. test_index_iterator_validity.cpp (411 lines, 10 tests)
- Snapshot pattern validation for iterator safety
- Partition removal stress tests (500+ partitions)
- Concurrent add/remove patterns (TSan validation)
- Data operations concurrent with partition removal
- Tests: safe removal, stress, concurrent access, interleaved patterns,
snapshot semantics, edge cases (empty, duplicates)
3. test_index_gpu_memory_safety.cpp (458 lines, 10 tests)
- GPU resource allocation/deallocation pairing (RAII)
- Memory leak detection across init/destroy cycles
- Exception safety during GPU initialization
- Large allocation handling near GPU memory limits
- Tests: basic allocation, leak detection, exception cleanup, large allocations,
concurrent management, explicit shutdown, idempotency, state validation
CMakeLists.txt Updates:
- Auto-discovery of test_index_*.cpp files preserved
- Conditional CUDA linkage for GPU tests when THEMIS_CUDA_ENABLED=ON
- Proper test registration via themis_register_module_focused_test()
Validation Coverage:
✓ 30 comprehensive tests (10 per test file)
✓ Exception safety (try/catch scenarios)
✓ RAII patterns (noexcept destructors)
✓ Memory safety (allocation/deallocation tracking)
✓ Concurrency (TSan-compatible multi-threaded tests)
✓ Edge cases (empty, large scale, duplicate operations)
✓ Timeout: 120s per test (reasonable for Phase 5 workloads)
Build Integration:
- Compile: cmake --build . -j 16 (automatically discovered)
- Run: ctest -R "test_index_(destructor|iterator|gpu)" --output-on-failure
- Sanitizers: Built-in support for ASan/TSan/UBSan
- No additional dependencies beyond existing test infrastructure
Fixes Phase 5 Blocker #6 (MEDIUM) by providing regression test coverage
for fixes #1-4:
Fix #1: VectorIndexManager::~VectorIndexManager() noexcept (line 94)
Fix #2: releaseHnswResources_() helper for safe cleanup (line 304)
Fix #3: GPUVectorIndex::~GPUVectorIndex() noexcept (line 121)
Fix #4: Iterator invalidation fix via snapshot pattern (line 107)
All tests are production-ready and CI/CD compatible.
Co-authored-by: makr-code <[email protected]>
35 of 57 tasks
11 of 57 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix CMake configuration to prevent "ALIAS target is missing" errors
ref: 7e043e7
Changes implemented:
link_requiredto safely check and link targetsAll changes are minimal and focused on adding defensive checks to prevent "ALIAS target is missing" errors. The helper function
link_requiredis provided for future use by maintainers to extend similar checks to other targets. Current code uses explicit target checks before existing target_link_libraries calls to maintain minimal changes.Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.