From cd46edcb672fed432f21227203a779aaefa16a87 Mon Sep 17 00:00:00 2001 From: dimgigov Date: Tue, 19 May 2026 12:13:33 +0300 Subject: [PATCH] Bump version to 1.1.6; fix storage bugs, tests, CI pipeline and Docker config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Storage fixes: - Fix bloom filter hash2 OverflowDefect (uint64 instead of int Hash) - Fix MemTable.put size calculation on overwrite (was leaking size) - Fix fuzz_test duplicate-key issues in LSM delete and SSTable tests Test fixes: - Fix stress_test.nim: replace deprecated threadpool with std/threads - Fix fuzz_test.nim: add missing imports (tables, algorithm, sets) - Fix fuzz_test.nim: var sst for close() compatibility - Remove unused imports from test_all.nim and bench_all.nim Docker / CI fixes: - Fix Dockerfile.source: invalid nimlang/nim:2.2.10-alpine tag → 2.2.10 + ubuntu:24.04 runtime - Fix Dockerfile.source healthcheck (--spider → -qO- for 200 OK) - Fix Dockerfile run comment ports (9470/9471 → 9912/9913) - Fix scripts/docker-run.sh healthcheck port (9470 → 9912) - Add ARG BUILD_DATE/VCS_REF to Dockerfile for docker-build.sh - Update all version strings 1.1.4 → 1.1.6 across nimble/docker/source/docs --- .gitignore | 2 ++ Dockerfile | 7 ++-- Dockerfile.source | 31 +++++++++-------- README.md | 18 +++++----- baradadb.nimble | 2 +- benchmarks/bench_all.nim | 1 - clients/javascript/package.json | 2 +- clients/nim/README.md | 2 +- clients/nim/baradb.nimble | 2 +- clients/python/baradb/__init__.py | 2 +- clients/python/pyproject.toml | 2 +- clients/rust/Cargo.toml | 2 +- docs/ar/installation.md | 6 ++-- docs/bg/changelog.md | 4 +-- docs/bg/clients.md | 2 +- docs/bg/configuration.md | 2 +- docs/bg/docker.md | 2 +- docs/bg/installation.md | 6 ++-- docs/bg/monitoring.md | 2 +- docs/bg/protocol.md | 2 +- docs/de/changelog.md | 4 +-- docs/de/configuration.md | 2 +- docs/de/installation.md | 2 +- docs/en/changelog.md | 4 +-- docs/en/configuration.md | 2 +- docs/en/installation.md | 4 +-- docs/fa/installation.md | 4 +-- docs/ru/configuration.md | 2 +- docs/ru/installation.md | 4 +-- docs/tr/installation.md | 6 ++-- docs/zh/configuration.md | 2 +- docs/zh/installation.md | 4 +-- formal-verification/README.md | 2 +- formal-verification/run_all.sh | 2 +- scripts/docker-run.sh | 2 +- src/barabadb/cli/shell.nim | 2 +- src/barabadb/core/httpserver.nim | 4 +-- src/barabadb/core/tracing.nim | 2 +- src/barabadb/mcp/server.nim | 4 +-- src/barabadb/storage/bloom.nim | 6 ++-- src/barabadb/storage/lsm.nim | 8 +++-- src/baradadb.nim | 2 +- tests/fuzz_test | Bin 728680 -> 0 bytes tests/fuzz_test.nim | 55 +++++++++++++++++++----------- tests/prop_test | Bin 2974144 -> 0 bytes tests/stress_test.nim | 39 +++++++++++++-------- tests/test_all.nim | 1 - 47 files changed, 150 insertions(+), 118 deletions(-) delete mode 100755 tests/fuzz_test delete mode 100755 tests/prop_test diff --git a/.gitignore b/.gitignore index 05fc769..0dad0f7 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ tests/stress_test tests/test_lock tests/test_minimal tests/tla_faithfulness +tests/fuzz_test +tests/prop_test benchmarks/bench_all benchmarks/compare clients/nim/tests/test_client diff --git a/Dockerfile b/Dockerfile index 05f4ccf..3c14f29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,13 +10,16 @@ # docker build -t baradb:latest . # # Run: -# docker run -d -p 9472:9472 -p 9470:9470 -p 9471:9471 -v baradb_data:/data baradb:latest +# docker run -d -p 9472:9472 -p 9912:9912 -p 9913:9913 -v baradb_data:/data baradb:latest FROM debian:bookworm-slim +ARG BUILD_DATE +ARG VCS_REF + LABEL maintainer="BaraDB Team" LABEL description="BaraDB — Multimodal Database Engine" -LABEL version="1.1.4" +LABEL version="1.1.6" # Инсталираме runtime зависимости # libpcre3 — нужна за Nim regex (зарежда се динамично) diff --git a/Dockerfile.source b/Dockerfile.source index 54954cc..5763afe 100644 --- a/Dockerfile.source +++ b/Dockerfile.source @@ -13,13 +13,10 @@ # docker build -f Dockerfile.source -t baradb:latest . # ─── Stage 1: Builder ───────────────────────────────────── -FROM nimlang/nim:2.2.10-alpine AS builder +FROM nimlang/nim:2.2.10 AS builder WORKDIR /build -# Инсталираме build зависимости -RUN apk add --no-cache git gcc musl-dev openssl-dev pcre-dev - # Копираме nimble файл и инсталираме публични зависимости COPY baradadb.nimble . RUN nimble install -d -y || true @@ -33,21 +30,27 @@ COPY *.nim . RUN nim c -d:release --opt:speed -d:ssl -o:baradadb src/baradadb.nim # Компилираме backup tool -RUN nim c -d:release -o:backup src/barabadb/core/backup.nim +RUN nim c -d:release --path:src -o:backup src/barabadb/core/backup.nim # ─── Stage 2: Production Runtime ────────────────────────── -FROM alpine:3.19 +FROM ubuntu:24.04 LABEL maintainer="BaraDB Team" LABEL description="BaraDB — Multimodal Database Engine (source build)" -LABEL version="1.1.4" +LABEL version="1.1.6" # Инсталираме runtime зависимости -RUN apk add --no-cache ca-certificates su-exec wget pcre +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libpcre3 \ + ca-certificates \ + wget \ + gosu && \ + rm -rf /var/lib/apt/lists/* # Създаваме dedicated потребител за сигурност -RUN addgroup -g 1000 -S baradb && \ - adduser -u 1000 -S baradb -G baradb +RUN groupadd -r baradb && \ + useradd -r -g baradb baradb WORKDIR /app @@ -66,20 +69,20 @@ RUN mkdir -p /data && chown baradb:baradb /data && \ # Environment variables (defaults) ENV BARADB_ADDRESS=0.0.0.0 ENV BARADB_PORT=9472 -ENV BARADB_HTTP_PORT=9470 -ENV BARADB_WS_PORT=9471 +# Note: HTTP port = TCP port + 440 (9912 when TCP=9472) +# Note: WS port = TCP port + 441 (9913 when TCP=9472) ENV BARADB_DATA_DIR=/data ENV BARADB_LOG_LEVEL=info # Expose ports -EXPOSE 9472 9470 9471 +EXPOSE 9472 9912 9913 # Volume за persistent data VOLUME ["/data"] # Healthcheck HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \ - CMD wget -q --spider http://localhost:${BARADB_HTTP_PORT}/health || exit 1 + CMD wget -qO- http://localhost:9912/health >/dev/null 2>&1 || exit 1 # Стартираме чрез entrypoint ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/README.md b/README.md index a1f7b86..2179fc6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **A multimodal database engine written in Nim — 100% native, zero dependencies.** -[![Version](https://img.shields.io/badge/version-1.1.4-blue.svg)](baradadb.nimble) +[![Version](https://img.shields.io/badge/version-1.1.6-blue.svg)](baradadb.nimble) [![Documentation](https://img.shields.io/badge/docs-7_languages-blue.svg)](docs/index.md) [![Stars](https://img.shields.io/github/stars/katehonz/barabaDB?style=social)](https://github.com/katehonz/barabaDB) @@ -1456,7 +1456,7 @@ nim c -d:release -r benchmarks/bench_all.nim | Protocol (binary + HTTP + WS + pool + auth + ratelimit) | ✅ | 100% | v1.0.0 | | Schema (inheritance + computed + migrations) | ✅ | 100% | v1.0.0 | | Vector engine (HNSW + IVF-PQ + quant + SIMD + metadata) | ✅ | 100% | v1.0.0 | -| Vector SQL Integration (VECTOR type, distance functions, <->, HNSW indexes) | ✅ | 100% | v1.1.4 | +| Vector SQL Integration (VECTOR type, distance functions, <->, HNSW indexes) | ✅ | 100% | v1.1.6 | | Graph engine (all algorithms + pattern matching) | ✅ | 100% | v1.0.0 | | FTS (BM25 + TF-IDF + fuzzy + regex + multi-language) | ✅ | 100% | v1.0.0 | | CLI shell | ✅ | 100% | v1.0.0 | @@ -1464,13 +1464,13 @@ nim c -d:release -r benchmarks/bench_all.nim | Cross-modal queries | ✅ | 100% | v1.0.0 | | Backup & Recovery | ✅ | 100% | v1.0.0 | | Client SDKs (JS, Python, Nim, Rust) | ✅ | 100% | v1.0.0 | -| Graph SQL Integration (CREATE GRAPH, GRAPH_TABLE, Cypher) | ✅ | 100% | v1.1.4 | -| Hybrid RAG Search (vector + FTS + RRF reranking) | ✅ | 100% | v1.1.4 | -| AI Chunking & Auto-Embedding (`chunk()`, `embed_text()`) | ✅ | 100% | v1.1.4 | -| NL→SQL (`nl_to_sql()`, `schema_prompt()`) | ✅ | 100% | v1.1.4 | -| MCP Server (STDIO JSON-RPC for AI agents) | ✅ | 100% | v1.1.4 | -| LangChain Vector Store (Python + JS) | ✅ | 100% | v1.1.4 | -| Production Hardening (prop tests, fuzz tests, thread safety) | ✅ | 100% | v1.1.4 | +| Graph SQL Integration (CREATE GRAPH, GRAPH_TABLE, Cypher) | ✅ | 100% | v1.1.6 | +| Hybrid RAG Search (vector + FTS + RRF reranking) | ✅ | 100% | v1.1.6 | +| AI Chunking & Auto-Embedding (`chunk()`, `embed_text()`) | ✅ | 100% | v1.1.6 | +| NL→SQL (`nl_to_sql()`, `schema_prompt()`) | ✅ | 100% | v1.1.6 | +| MCP Server (STDIO JSON-RPC for AI agents) | ✅ | 100% | v1.1.6 | +| LangChain Vector Store (Python + JS) | ✅ | 100% | v1.1.6 | +| Production Hardening (prop tests, fuzz tests, thread safety) | ✅ | 100% | v1.1.6 | ## Current Limitations diff --git a/baradadb.nimble b/baradadb.nimble index 1715e19..043173d 100644 --- a/baradadb.nimble +++ b/baradadb.nimble @@ -1,5 +1,5 @@ # Package -version = "1.1.4" +version = "1.1.6" author = "BaraDB Team" description = "BaraDB — Multimodal database written in Nim" license = "Apache-2.0" diff --git a/benchmarks/bench_all.nim b/benchmarks/bench_all.nim index d97c8e4..f0a1a7c 100644 --- a/benchmarks/bench_all.nim +++ b/benchmarks/bench_all.nim @@ -1,7 +1,6 @@ ## BaraDB Benchmarks — performance tests for all engines import std/monotimes import std/times -import std/tables import std/random import std/strutils import std/os diff --git a/clients/javascript/package.json b/clients/javascript/package.json index 86f589e..81b77a3 100644 --- a/clients/javascript/package.json +++ b/clients/javascript/package.json @@ -1,6 +1,6 @@ { "name": "baradb", - "version": "1.1.4", + "version": "1.1.6", "description": "Official JavaScript/Node.js client for BaraDB — Multimodal Database Engine", "main": "baradb.js", "types": "baradb.d.ts", diff --git a/clients/nim/README.md b/clients/nim/README.md index 7b64850..9028702 100644 --- a/clients/nim/README.md +++ b/clients/nim/README.md @@ -15,7 +15,7 @@ Official Nim client for **BaraDB** — a multimodal database engine. Add to your `.nimble` file: ```nim -requires "baradb >= 1.1.4" +requires "baradb >= 1.1.6" ``` Or clone locally: diff --git a/clients/nim/baradb.nimble b/clients/nim/baradb.nimble index 7ec2fbd..142e748 100644 --- a/clients/nim/baradb.nimble +++ b/clients/nim/baradb.nimble @@ -1,6 +1,6 @@ # Package -version = "1.1.4" +version = "1.1.6" author = "BaraDB Team" description = "Official Nim client for BaraDB — async binary protocol client" license = "Apache-2.0" diff --git a/clients/python/baradb/__init__.py b/clients/python/baradb/__init__.py index bcb4c09..080c8b9 100644 --- a/clients/python/baradb/__init__.py +++ b/clients/python/baradb/__init__.py @@ -41,7 +41,7 @@ from .core import ( ResultFormat, ) -__version__ = "1.1.4" +__version__ = "1.1.6" __all__ = [ "Client", "QueryBuilder", diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml index 2d984a9..ed315c8 100644 --- a/clients/python/pyproject.toml +++ b/clients/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "baradb" -version = "1.1.4" +version = "1.1.6" description = "Official Python client for BaraDB — Multimodal Database Engine" readme = "README.md" license = { text = "Apache-2.0" } diff --git a/clients/rust/Cargo.toml b/clients/rust/Cargo.toml index 9c756b0..c279289 100644 --- a/clients/rust/Cargo.toml +++ b/clients/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "baradb" -version = "1.1.4" +version = "1.1.6" edition = "2021" authors = ["BaraDB Team "] description = "Official async Rust client for BaraDB — binary protocol client" diff --git a/docs/ar/installation.md b/docs/ar/installation.md index 1ae3aaa..7b6a842 100644 --- a/docs/ar/installation.md +++ b/docs/ar/installation.md @@ -143,7 +143,7 @@ strip build/baradadb ```bash ./build/baradadb --version -# المتوقع: BaraDB v1.1.4 — Multimodal Database Engine +# المتوقع: BaraDB v1.1.6 — Multimodal Database Engine ``` ## تشغيل الاختبارات @@ -237,7 +237,7 @@ docker-compose up -d أضف إلى ملف `.nimble` الخاص بك: ```nim -requires "barabadb >= 1.1.4" +requires "barabadb >= 1.1.6" ``` استخدم في الكود: @@ -258,7 +258,7 @@ db.close() ./build/baradadb # المخرجات المتوقعة: -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine # BaraDB TCP listening on 127.0.0.1:9472 # الاختبار عبر HTTP API diff --git a/docs/bg/changelog.md b/docs/bg/changelog.md index 035134e..e9bc2a1 100644 --- a/docs/bg/changelog.md +++ b/docs/bg/changelog.md @@ -41,7 +41,7 @@ ### Добавки -- **Client SDKs v1.1.4** — Пълнофункционални клиенти за всички езици: +- **Client SDKs v1.1.6** — Пълнофункционални клиенти за всички езици: - JavaScript: TypeScript дефиниции, package.json, примери, unit и integration тестове - Python: Преструктуриран като пакет (`baradb/` с `__init__.py` и `core.py`), pyproject.toml, примери, тестове (query builder, wire protocol, integration) - Nim: Примери, integration тестове, README @@ -72,7 +72,7 @@ ### Промени - **Версията е вдигната до 1.1.0** във всички компоненти (сървър, Docker изображения, клиенти, CLI) -- **README** — Версионният badge е обновен; всички feature таблици вече реферират v1.1.4 +- **README** — Версионният badge е обновен; всички feature таблици вече реферират v1.1.6 - **TLA+ Формална Верификация** — Добавени `crossmodal.tla`, `backup.tla`, `recovery.tla`; symmetry reduction във всички 9 спецификации - **Чист build** — 0 компилаторни предупреждения на Nim 2.2.10 diff --git a/docs/bg/clients.md b/docs/bg/clients.md index 35dbf67..2718d8e 100644 --- a/docs/bg/clients.md +++ b/docs/bg/clients.md @@ -129,7 +129,7 @@ asyncio.run(main()) ```nim # Във вашия .nimble файл -requires "barabadb >= 1.1.4" +requires "barabadb >= 1.1.6" ``` ### Вградена Употреба diff --git a/docs/bg/configuration.md b/docs/bg/configuration.md index 31f6808..c16fd49 100644 --- a/docs/bg/configuration.md +++ b/docs/bg/configuration.md @@ -159,7 +159,7 @@ raft_peers = "node2:9001,node3:9001" ``` ``` -BaraDB v1.1.4 — Multimodal Database Engine +BaraDB v1.1.6 — Multimodal Database Engine Употреба: baradadb [опции] diff --git a/docs/bg/docker.md b/docs/bg/docker.md index ec25c91..42c5cfc 100644 --- a/docs/bg/docker.md +++ b/docs/bg/docker.md @@ -39,7 +39,7 @@ docker compose logs -f docker build -t baradb:latest . # С конкретна версия -docker build -t baradb:1.1.4 . +docker build -t baradb:1.1.6 . ``` ## Стартиране diff --git a/docs/bg/installation.md b/docs/bg/installation.md index ae4509b..02107ce 100644 --- a/docs/bg/installation.md +++ b/docs/bg/installation.md @@ -143,7 +143,7 @@ strip build/baradadb ```bash ./build/baradadb --version -# Очакван резултат: BaraDB v1.1.4 — Multimodal Database Engine +# Очакван резултат: BaraDB v1.1.6 — Multimodal Database Engine ``` ## Стартиране на Тестове @@ -234,7 +234,7 @@ docker-compose up -d Добавете към вашия `.nimble` файл: ```nim -requires "barabadb >= 1.1.4" +requires "barabadb >= 1.1.6" ``` Използване в кода: @@ -255,7 +255,7 @@ db.close() ./build/baradadb # Очакван изход: -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine # BaraDB TCP listening on 127.0.0.1:9472 # Тестване с HTTP API diff --git a/docs/bg/monitoring.md b/docs/bg/monitoring.md index 4f4df93..c88140a 100644 --- a/docs/bg/monitoring.md +++ b/docs/bg/monitoring.md @@ -13,7 +13,7 @@ curl http://localhost:9470/health ```json { "status": "healthy", - "version": "1.1.4", + "version": "1.1.6", "uptime_seconds": 86400, "checks": { "storage": "ok", diff --git a/docs/bg/protocol.md b/docs/bg/protocol.md index e7be381..96bcf96 100644 --- a/docs/bg/protocol.md +++ b/docs/bg/protocol.md @@ -136,7 +136,7 @@ GET /health ```json { "status": "healthy", - "version": "1.1.4", + "version": "1.1.6", "uptime_seconds": 86400 } ``` diff --git a/docs/de/changelog.md b/docs/de/changelog.md index e16812f..34c425e 100644 --- a/docs/de/changelog.md +++ b/docs/de/changelog.md @@ -50,7 +50,7 @@ Alle bemerkenswerten Änderungen an BaraDB werden in dieser Datei dokumentiert. ### Hinzugefügt -- **Client SDKs v1.1.4** — Vollständige Clients für alle Sprachen: +- **Client SDKs v1.1.6** — Vollständige Clients für alle Sprachen: - JavaScript: TypeScript Definitionen, package.json, Beispiele, Unit & Integration Tests - Python: Umstrukturiert als proper Package (`baradb/` mit `__init__.py` und `core.py`), pyproject.toml, Beispiele, Tests - Nim: Beispiele, Integration Tests, README @@ -81,7 +81,7 @@ Alle bemerkenswerten Änderungen an BaraDB werden in dieser Datei dokumentiert. ### Geändert - **Version auf 1.1.0 erhöht** über alle Komponenten -- **README** — Version Badge aktualisiert; alle Feature-Tabellen referenzieren jetzt v1.1.4 +- **README** — Version Badge aktualisiert; alle Feature-Tabellen referenzieren jetzt v1.1.6 - **TLA+ Formal Verification** — `crossmodal.tla`, `backup.tla`, `recovery.tla` hinzugefügt; Symmetrie-Reduktion in allen 9 Specs - **Clean build** — 0 Compiler Warnings auf Nim 2.2.10 diff --git a/docs/de/configuration.md b/docs/de/configuration.md index ca6481b..e6ea6b2 100644 --- a/docs/de/configuration.md +++ b/docs/de/configuration.md @@ -156,7 +156,7 @@ raft_peers = "node2:9001,node3:9001" ``` ``` -BaraDB v1.1.4 — Multimodal Database Engine +BaraDB v1.1.6 — Multimodal Database Engine Usage: baradadb [options] diff --git a/docs/de/installation.md b/docs/de/installation.md index f2937bd..8bc79c1 100644 --- a/docs/de/installation.md +++ b/docs/de/installation.md @@ -40,7 +40,7 @@ docker compose up -d ```bash ./build/baradadb --version -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine ./build/baramcp --data-dir ./data & echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | ./build/baramcp diff --git a/docs/en/changelog.md b/docs/en/changelog.md index 9baaf70..b290cd8 100644 --- a/docs/en/changelog.md +++ b/docs/en/changelog.md @@ -65,7 +65,7 @@ All notable changes to BaraDB are documented in this file. ### Added -- **Client SDKs v1.1.4** — Full-featured clients for all languages: +- **Client SDKs v1.1.6** — Full-featured clients for all languages: - JavaScript: TypeScript definitions, package.json, examples, unit & integration tests - Python: Restructured as proper package (`baradb/` with `__init__.py` and `core.py`), pyproject.toml, examples, tests (query builder, wire protocol, integration) - Nim: Examples, integration tests, README @@ -96,7 +96,7 @@ All notable changes to BaraDB are documented in this file. ### Changed - **Version bumped to 1.1.0** across all components (server, Docker images, clients, CLI) -- **README** — Version badge updated; all feature tables now reference v1.1.4 +- **README** — Version badge updated; all feature tables now reference v1.1.6 - **TLA+ Formal Verification** — Added `crossmodal.tla`, `backup.tla`, `recovery.tla`; symmetry reduction in all 9 specs - **Clean build** — 0 compiler warnings on Nim 2.2.10 diff --git a/docs/en/configuration.md b/docs/en/configuration.md index e0ae705..094b569 100644 --- a/docs/en/configuration.md +++ b/docs/en/configuration.md @@ -158,7 +158,7 @@ raft_peers = "node2:9001,node3:9001" ``` ``` -BaraDB v1.1.4 — Multimodal Database Engine +BaraDB v1.1.6 — Multimodal Database Engine Usage: baradadb [options] diff --git a/docs/en/installation.md b/docs/en/installation.md index c961355..6189d4f 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -144,7 +144,7 @@ strip build/baradadb ```bash ./build/baradadb --version -# Expected: BaraDB v1.1.4 — Multimodal Database Engine +# Expected: BaraDB v1.1.6 — Multimodal Database Engine ``` ## Running Tests @@ -259,7 +259,7 @@ db.close() ./build/baradadb # Expected output: -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine # BaraDB TCP listening on 127.0.0.1:9472 # Test with HTTP API diff --git a/docs/fa/installation.md b/docs/fa/installation.md index f3e5803..9eee320 100644 --- a/docs/fa/installation.md +++ b/docs/fa/installation.md @@ -144,7 +144,7 @@ strip build/baradadb ```bash ./build/baradadb --version -# انتظار: BaraDB v1.1.4 — Multimodal Database Engine +# انتظار: BaraDB v1.1.6 — Multimodal Database Engine ``` ## اجرای تست‌ها @@ -259,7 +259,7 @@ db.close() ./build/baradadb # خروجی مورد انتظار: -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine # BaraDB TCP listening on 127.0.0.1:9472 # تست با HTTP API diff --git a/docs/ru/configuration.md b/docs/ru/configuration.md index 80f6e8b..dfa456d 100644 --- a/docs/ru/configuration.md +++ b/docs/ru/configuration.md @@ -156,7 +156,7 @@ raft_peers = "node2:9001,node3:9001" ``` ``` -BaraDB v1.1.4 — Multimodal Database Engine +BaraDB v1.1.6 — Multimodal Database Engine Usage: baradadb [options] diff --git a/docs/ru/installation.md b/docs/ru/installation.md index 4393922..95a261b 100644 --- a/docs/ru/installation.md +++ b/docs/ru/installation.md @@ -144,7 +144,7 @@ strip build/baradadb ```bash ./build/baradadb --version -# Ожидается: BaraDB v1.1.4 — Multimodal Database Engine +# Ожидается: BaraDB v1.1.6 — Multimodal Database Engine ``` ## Запуск тестов @@ -259,7 +259,7 @@ db.close() ./build/baradadb # Ожидаемый вывод: -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine # BaraDB TCP listening on 127.0.0.1:9472 # Проверка через HTTP API diff --git a/docs/tr/installation.md b/docs/tr/installation.md index 9ea5be8..4c65084 100644 --- a/docs/tr/installation.md +++ b/docs/tr/installation.md @@ -143,7 +143,7 @@ strip build/baradadb ```bash ./build/baradadb --version -# Beklenen: BaraDB v1.1.4 — Multimodal Database Engine +# Beklenen: BaraDB v1.1.6 — Multimodal Database Engine ``` ## Testleri Çalıştırma @@ -237,7 +237,7 @@ docker-compose up -d `.nimble` dosyanıza ekleyin: ```nim -requires "barabadb >= 1.1.4" +requires "barabadb >= 1.1.6" ``` Kodunuzda kullanın: @@ -258,7 +258,7 @@ db.close() ./build/baradadb # Beklenen çıktı: -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine # BaraDB TCP listening on 127.0.0.1:9472 # HTTP API ile test et diff --git a/docs/zh/configuration.md b/docs/zh/configuration.md index 442cece..f90db00 100644 --- a/docs/zh/configuration.md +++ b/docs/zh/configuration.md @@ -156,7 +156,7 @@ raft_peers = "node2:9001,node3:9001" ``` ``` -BaraDB v1.1.4 — Multimodal Database Engine +BaraDB v1.1.6 — Multimodal Database Engine Usage: baradadb [options] diff --git a/docs/zh/installation.md b/docs/zh/installation.md index 76e0e77..2ae02eb 100644 --- a/docs/zh/installation.md +++ b/docs/zh/installation.md @@ -144,7 +144,7 @@ strip build/baradadb ```bash ./build/baradadb --version -# 预期输出: BaraDB v1.1.4 — Multimodal Database Engine +# 预期输出: BaraDB v1.1.6 — Multimodal Database Engine ``` ## 运行测试 @@ -259,7 +259,7 @@ db.close() ./build/baradadb # 预期输出: -# BaraDB v1.1.4 — Multimodal Database Engine +# BaraDB v1.1.6 — Multimodal Database Engine # BaraDB TCP listening on 127.0.0.1:9472 # 使用 HTTP API 测试 diff --git a/formal-verification/README.md b/formal-verification/README.md index 4598d82..db2ba6c 100644 --- a/formal-verification/README.md +++ b/formal-verification/README.md @@ -21,7 +21,7 @@ This directory contains TLA+ specifications for core BaraDB distributed-systems - Java Runtime Environment (JRE) 8+ — the bundled `tla2tools.jar` contains TLC and SANY. - Or [TLA+ Toolbox](https://lamport.azurewebsites.net/tla/toolbox.html) (GUI + TLC model checker). -## Verified State Space (v1.1.4) +## Verified State Space (v1.1.6) | Spec | States Generated | Distinct States | Depth | |------|-----------------|-----------------|-------| diff --git a/formal-verification/run_all.sh b/formal-verification/run_all.sh index 1a7b42c..52d2a0d 100755 --- a/formal-verification/run_all.sh +++ b/formal-verification/run_all.sh @@ -22,7 +22,7 @@ run_tlc() { } echo "==============================================" -echo " BaraDB Formal Verification Suite v1.1.4" +echo " BaraDB Formal Verification Suite v1.1.6" echo " Running TLC model checker on all specs" echo "==============================================" echo "" diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index d7afd1e..0ba4a3f 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -29,7 +29,7 @@ docker run -d \ -e BARADB_PORT=9472 \ -e BARADB_DATA_DIR=/data \ -e BARADB_LOG_LEVEL=info \ - --health-cmd "wget -q --spider http://localhost:9470/health || exit 1" \ + --health-cmd "wget -q --spider http://localhost:9912/health || exit 1" \ --health-interval 15s \ --health-timeout 5s \ --health-retries 3 \ diff --git a/src/barabadb/cli/shell.nim b/src/barabadb/cli/shell.nim index 28e79be..447e934 100644 --- a/src/barabadb/cli/shell.nim +++ b/src/barabadb/cli/shell.nim @@ -5,7 +5,7 @@ import ../query/lexer import ../query/parser const - Version = "1.1.4" + Version = "1.1.6" Prompt = "bara> " ContinuationPrompt = " .. > " diff --git a/src/barabadb/core/httpserver.nim b/src/barabadb/core/httpserver.nim index c3c4f77..3a5e8fc 100644 --- a/src/barabadb/core/httpserver.nim +++ b/src/barabadb/core/httpserver.nim @@ -199,7 +199,7 @@ proc queryHandler(server: HttpServer): RequestHandler = proc healthHandler(): RequestHandler = return proc(request: Request) {.gcsafe.} = let ctx = newContext(request) - ctx.json(%*{"status": "ok", "version": "1.1.4"}) + ctx.json(%*{"status": "ok", "version": "1.1.6"}) proc metricsHandler(server: HttpServer): RequestHandler = return proc(request: Request) {.gcsafe.} = @@ -535,7 +535,7 @@ function showTab(idx){ } setInterval(() => { if(document.querySelectorAll('.panel')[4].classList.contains('active')) loadMetrics() }, 5000) -
BaraDB v1.1.4 — Multimodal Database Engine
+
BaraDB v1.1.6 — Multimodal Database Engine
""" request.respond(200, @[("Content-Type", "text/html; charset=utf-8")], html) diff --git a/src/barabadb/core/tracing.nim b/src/barabadb/core/tracing.nim index a8bcac0..324c1e0 100644 --- a/src/barabadb/core/tracing.nim +++ b/src/barabadb/core/tracing.nim @@ -116,7 +116,7 @@ proc exportOtlp*(tracer: Tracer, endpoint: string = "http://localhost:4318/v1/tr {"key": "service.name", "value": {"stringValue": "baradadb"}} ]}, "scopeSpans": [{ - "scope": {"name": "baradadb-tracer", "version": "1.1.4"}, + "scope": {"name": "baradadb-tracer", "version": "1.1.6"}, "spans": otlpSpans }] }] diff --git a/src/barabadb/mcp/server.nim b/src/barabadb/mcp/server.nim index 8bdf867..af08d1f 100644 --- a/src/barabadb/mcp/server.nim +++ b/src/barabadb/mcp/server.nim @@ -503,7 +503,7 @@ proc handleInitialize(params: JsonNode): JsonNode = "protocolVersion": "2024-11-05", "serverInfo": { "name": "BaraDB MCP Server", - "version": "1.1.4" + "version": "1.1.6" }, "capabilities": { "tools": {} @@ -690,7 +690,7 @@ proc processMessage(raw: string): string = # --------------------------------------------------------------------------- proc init*(dataDir: string = "./data"): McpServerCtx = - logToStderr("BaraDB MCP Server v1.1.4 initializing...") + logToStderr("BaraDB MCP Server v1.1.6 initializing...") let db = newLSMTree(dataDir) let ctx = newExecutionContext(db) ctx.txnManager = newTxnManager() diff --git a/src/barabadb/storage/bloom.nim b/src/barabadb/storage/bloom.nim index 0f2b038..b2c81f9 100644 --- a/src/barabadb/storage/bloom.nim +++ b/src/barabadb/storage/bloom.nim @@ -24,10 +24,10 @@ proc hash1*(bf: BloomFilter, data: openArray[byte]): uint64 = result = uint64(!$h) proc hash2*(bf: BloomFilter, data: openArray[byte]): uint64 = - var h: Hash = 5381 + var h: uint64 = 5381 for b in data: - h = ((h shl 5) + h) + Hash(b) - result = uint64(h) + h = ((h shl 5) + h) + uint64(b) + result = h proc getHashes(bf: BloomFilter, data: openArray[byte]): seq[int] = let h1 = bf.hash1(data) diff --git a/src/barabadb/storage/lsm.nim b/src/barabadb/storage/lsm.nim index fe523dd..ff98c2f 100644 --- a/src/barabadb/storage/lsm.nim +++ b/src/barabadb/storage/lsm.nim @@ -68,15 +68,17 @@ proc put*(mt: var MemTable, key: string, value: seq[byte], timestamp: uint64, de let entrySize = key.len + value.len + 16 if entrySize > mt.maxSize: return false - if mt.size + entrySize > mt.maxSize and mt.entries.len > 0: - return false let entry = Entry(key: key, value: value, timestamp: timestamp, deleted: deleted) let pos = mt.entries.lowerBound(entry, proc(a, b: Entry): int = cmp(a.key, b.key)) if pos < mt.entries.len and mt.entries[pos].key == key: + let oldSize = mt.entries[pos].key.len + mt.entries[pos].value.len + 16 mt.entries[pos] = entry + mt.size += entrySize - oldSize else: + if mt.size + entrySize > mt.maxSize and mt.entries.len > 0: + return false mt.entries.insert(entry, pos) - mt.size += entrySize + mt.size += entrySize return true proc get*(mt: MemTable, key: string): (bool, Entry) = diff --git a/src/baradadb.nim b/src/baradadb.nim index ac288d3..0ad6870 100644 --- a/src/baradadb.nim +++ b/src/baradadb.nim @@ -211,7 +211,7 @@ proc main() = # Init structured logger from config let logLvl = parseEnum[LogLevel]("ll" & capitalizeAscii(config.logLevel)) defaultLogger = newLogger(logLvl, config.logFile) - info("BaraDB v1.1.4 — Multimodal Database Engine") + info("BaraDB v1.1.6 — Multimodal Database Engine") # Security check: warn if JWT secret is not configured if config.jwtSecret.len == 0: diff --git a/tests/fuzz_test b/tests/fuzz_test deleted file mode 100755 index 42145751486f0e3485db00df128c4b869b2a22ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 728680 zcmeFa33yy(^#?p@JCL#^EY+}wr5fxXEUN(o0x~)%#jph9f=z+eRA{NCfdGb1NrN*C zBcp7iqC`ZEiV&4$M8Ii*X7tZ8EJ{?Cp%l0wRRR<`LTSI>Ip;ld@0?^Re?LE;=X)Na z^xpe>&wI{!&pGe@-aAVpCw_8LO-)GuCWnp=(Npegg0#4VrVniG?n0rKP;+QI{JU4E zF|-BHDfq9&rP^!#WJ%C#t)nBD^0m5jd)>{^=~XqPE9I;9*KwAl=rvR?&y+7rw~OT2 zUQce>k`weA%*XO_k{&YG%)7!*ufcp|n?(;wiS2dmQIc=w9Jy+~NqD4ug?A;Ny%wDz z^s4qG9qGSC&Yt$#h&1|ZU0EuS)rt2>*QHV7XIyr@px4 zY|i(8)U(y)8)z3!_PXy*B1f;P=gG)N_I$5@E?h#VsGe2Imp(!`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