Skip to content

Add comprehensive RAID cluster documentation for setup, monitoring, and troubleshooting - #190

Merged
makr-code merged 4 commits into
developfrom
copilot/create-github-issue-for-raid
Jan 4, 2026
Merged

makr-code merged 4 commits into
developfrom
copilot/create-github-issue-for-raid

Conversation

Copilot AI commented Jan 4, 2026 •

Copy link
Copy Markdown
Contributor

Documents ThemisDB RAID cluster architecture, shard referencing, and resolves confusion around Prometheus/Grafana integration failures caused by port misconfiguration and Docker image platform mismatches.

Documentation Added

Core Issue Documentation

  • GITHUB_ISSUE_RAID_SETUP.md (22 KB) - Root cause analysis and solutions for:
    • Prometheus metrics endpoint configuration (port 8080 vs 9090)
    • Docker image platform mismatch (Windows PE in Linux containers)
    • Shard discovery and peer communication failures
    • RAID0/1/5 architecture with port mappings for 8 shards + monitoring stack

Technical Reference

  • RAID_SHARD_REFERENCING_ARCHITECTURE.md (24 KB) - Implementation details:
    • Shard addressing schema and discovery mechanisms
    • Data distribution algorithms for each RAID mode with code
    • Wire Protocol (port 18765) and REST API (port 8080) specifications
    • Consistency models: eventual (RAID0), 2PC (RAID1), read-your-writes (RAID5)
    • Failure detection and recovery procedures including XOR-based RAID5 rebuild

Operations

  • RAID_TROUBLESHOOTING_QUICK_GUIDE.md (12 KB) - 30-second diagnostics for 7 common issues:

    • Container exec format errors, metrics 404s, Prometheus scrape failures
    • Copy-paste diagnostic commands and quick fixes
    • Monitoring queries and log collection scripts
  • RAID_DOCUMENTATION_HUB.md (13 KB) - Navigation hub with use-case driven paths

  • RAID_DOCUMENTATION_IMPLEMENTATION_SUMMARY.md (14 KB) - Complete implementation reference

Key Solutions Documented

Metrics Endpoint Fix:

# Wrong - nothing listens on 9090
ports:
  - "9091:9090"

# Correct - REST API serves /metrics on 8080
ports:
  - "18765:18765"  # Wire Protocol
  - "8080:8080"    # REST API + /metrics

Prometheus Scrape Configuration:

scrape_configs:
  - job_name: 'raid0-stripe'
    static_configs:
      - targets:
        - 'themis-raid0-shard1:8080'  # Not 9090
        - 'themis-raid0-shard2:8080'
        - 'themis-raid0-shard3:8080'
    metrics_path: '/metrics'

Docker Image Build:

# Must build Linux binary for ubuntu:24.04 containers
FROM ubuntu:24.04 AS builder
RUN cmake -DTHEMIS_ENABLE_METRICS=ON ...
COPY --from=builder /build/themis_server /usr/local/bin/

Coverage

  • 3 RAID modes (RAID0, RAID1, RAID5) with complete failover procedures
  • 18 services mapped (8 shards, Prometheus, Grafana)
  • 100+ code examples, 150+ diagnostic commands, 15+ architecture diagrams
  • Cross-references to existing benchmark and deployment documentation

Updated: docs/00_DOCUMENTATION_INDEX.md with RAID section

Original prompt

Erstelle ein github issus und geben die md dazu

[Chronological Review: The conversation began with the user requesting to check Google benchmarks and test for a complete suite for the Docker RAID context. The user then specified using Python and C++ sources for a comprehensive test with a minimum runtime of one hour. Subsequent requests involved building, testing, fixing code, and evaluating data, leading to discussions about Grafana integration and Prometheus connection issues. The user identified problems with the server configuration and requested checks on logs and builds, emphasizing the need for a functional hyperscaler edition. The conversation culminated in the user asking to create a GitHub issue regarding the RAID concept and shard referencing.]

[Intent Mapping:

  1. "Prüfe die google benchmarks und test ob wir bereits eine komplette suit für den docker raid context haben." - Check for existing benchmarks and test suite.
  2. "Okay, nehmen wir die Python und vorhandenen C++ und Internetquellen github usw. als Vorbild für einen umfangreichen test." - Use existing sources for a comprehensive test.
  3. "fix it" - Request to fix issues encountered.
  4. "Wir brauchen einen Bericht über die funktionsfähigkeit und performance des themis raid." - Request for a report on functionality and performance.
  5. "Prüfe die konfiguration gegen den docker-container." - Check configuration against Docker container.
  6. "Es gibt auch einige deaktivierte Teile die es nicht sein sollten." - Identify and fix disabled components in the build.
  7. "okay erstellen ein github hotfix dann untersuchen wir den Fehler." - Create a GitHub hotfix to investigate errors.
  8. "Erstelle ein github issus und geben die md dazu." - Create a GitHub issue and provide markdown documentation.]

[Technical Inventory:

  • Technologies: Docker, Grafana, Prometheus, Python, C++
  • Tools: GitHub for issue tracking, Docker for containerization, Grafana for monitoring, Prometheus for metrics collection.
  • Concepts: RAID architecture, sharding, clustering, multi-model database API.]

[Code Archaeology:

  • Files discussed: c:\VCC\themis\docs\RAID_BUILD_DEPLOY.md, c:\VCC\themis.dockerignore, c:\VCC\themis\docker\compose\docker-compose-sharding.yml.
  • Key functions: API endpoints for health checks, entity management, and transaction execution.]

[Progress Assessment:

  • Completed: Initial tests and evaluations of the Themis RAID setup, identification of issues with Grafana and Prometheus integration.
  • Pending: Fixing build errors, creating GitHub issues, and optimizing the hyperscaler edition.]

[Context Validation: All critical information for continuation is captured, including user requests for testing, fixing, and documentation.]

[Recent Commands Analysis:

  • Last Agent Commands: "Erstelle ein github issus und geben die md dazu." - User requested to create a GitHub issue and provide markdown documentation.
  • Tool Results Summary: No specific tool results were returned as this was a user command.
  • Pre-Summary State: The agent was actively working on creating a GitHub issue related to the RAID concept and shard referencing when the token budget was exceeded.
  • Operation Context: These commands relate to the user's goal of addressing issues with the Themis RAID setup and ensuring proper documentation and tracking of problems.]
1. Conversation Overview: - Primary Objectives: The user aimed to test and optimize the Themis RAID setup, ensure proper integration with Grafana and Prometheus, and document the build and deployment processes. - Session Context: The conversation progressed through various stages of testing, debugging, and documentation, with a focus on ensuring functionality and performance. - User Intent Evolution: The user shifted from initial testing requests to addressing specific integration issues and ultimately to documenting problems and creating GitHub issues.
  1. Technical Foundation:
  • Docker: Used for containerization of Themis RAID setup.
  • Grafana: Monitoring tool for visualizing metrics.
  • Prometheus: Metrics collection tool, with issues noted in connection to Grafana.
  • Python and C++: Languages referenced for testing frameworks.
  1. Codebase Status:
  • c:\VCC\themis\docs\RAID_BUILD_DEPLOY.md:
    • Purpose: Documentation of the build and deployment process for Themis RAID.
    • Current State: Ongoing updates and modifications based on testing results.
    • Key Code Segments: API endpoints for health checks and entity management.
  • c:\VCC\themis.dockerignore:
    • Purpose: Configuration for Docker to ignore certain files during the build process.
    • Current State: Recent edits made to optimize the build.
  • c:\VCC\themis\docker\compose\docker-compose-sharding.yml:
    • Purpose: Docker Compose configuration for sharding setup.
    • Current State: Recent changes to address integration issues.
  1. Problem Resolution:
  • Issues Encountered: Connection issues between Grafana and Prometheus, disabled features...

Erstellt aus VS Code.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Create GitHub issue for RAID concept and shard referencing Add comprehensive RAID cluster documentation for setup, monitoring, and troubleshooting Jan 4, 2026
Copilot AI requested a review from makr-code January 4, 2026 11:15
@makr-code
makr-code marked this pull request as ready for review January 4, 2026 18:40
@makr-code
makr-code merged commit bede053 into develop Jan 4, 2026
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
@makr-code makr-code mentioned this pull request Mar 12, 2026
13 tasks
Copilot AI added a commit that referenced this pull request Mar 15, 2026
…190)

- Add LeakyBucket class: constant-rate traffic shaper with overflow detection
- Add CongestionController class: AIMD (slow-start + additive-increase/multiplicative-decrease)
- Extend QoSManager::Config: max_bandwidth_mbps, per_connection_limit_mbps, enable_priority_queuing, starvation_guard_threshold
- Add snake_case API: set_priority(), set_bandwidth_limit(), set_token_bucket()
- Add leaky bucket integration: setLeakyBucket() / clearLeakyBucket()
- Add priority queue scheduling: enqueueSend() / dequeueForSend() / getPendingQueueDepth()
- Add fair-queuing starvation guard in dequeueForSend()
- Add congestion control: recordAck() / recordLoss() / getCongestionWindow()
- Add Linux tc integration: configureTc(TcConfig) with interface name injection prevention
- allowSend() now also checks leaky bucket conformance
- Add 37 focused tests in test_bandwidth_management_qos.cpp
- Add CI workflow: bandwidth-management-qos-ci.yml

Co-authored-by: makr-code <[email protected]>
Copilot AI added a commit that referenced this pull request Mar 15, 2026
…nStats CC fields, ROADMAP updates, tc argument injection prevention

- allowSend() now gates sends on CongestionController cwnd (congestion control integration)
- ConnectionStats: add congestion_window, congestion_ssthresh_bytes, smoothed_rtt_us fields
- getConnectionStats() populates new CC fields
- configureTc(): reject interface names starting with '-' to prevent tc argument injection
- 3 new tests: AllowSendBlockedByCongestionWindow, AllowSendAfterWindowDrainedIsPermitted, ConnectionStatsExposesCC
- LinuxTcTest: add dash-prefix injection test cases
- src/network/ROADMAP.md: mark Bandwidth Management and QoS done with full detail
- src/ROADMAP.md: row #190 marked ✅
- src/network/FUTURE_ENHANCEMENTS.md: section updated with implementation status

Co-authored-by: makr-code <[email protected]>
makr-code added a commit that referenced this pull request Mar 15, 2026
…ent-qos

feat(network): Bandwidth Management and QoS — v1.8.0 Issue #190
Copilot AI added a commit that referenced this pull request May 5, 2026
Copilot AI added a commit that referenced this pull request Aug 11, 2026
makr-code added a commit that referenced this pull request Aug 11, 2026
…rts-again

fix(image_analysis): prevent int overflow in YOLOv8 tensor size calculations (CodeQL #190)
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.

2 participants