# Changelog **English** · [Русский](CHANGELOG.ru.md) This file records notable changes to ClickStorServer. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.0.3] - 2026-11-28 ### Added - Maintain a Russian translation of the changelog and include both changelogs and their SHA-256 sidecars in release downloads. - Add a complete Russian root README and consistent language links across the README and changelog pairs. ### Changed - Reorganize the Docker deployment guides around ClickHouse location and network access, with bridge and host examples, connection and readiness checks, and separate instructions for isolated developer testing. - Put Docker and systemd artifacts and their checksums in `docker/` and `systemd/` for new local and published releases. Keep both changelogs and their checksums at the version root. Existing releases retain their original download paths. - Document a complete ClickHouse reader setup for Docker and systemd, with database-wide read grants for dedicated archive databases, interactive verification, and network-specific account restrictions. ## [0.0.2] - 2026-11-27 ### Added - SSH/SCP publishing for tagged release downloads, with local and remote SHA-256 verification and atomic publication without replacing an existing version. - Build versioned Docker and systemd deployment ZIPs and SHA-256 sidecars independently or as part of a release. ### Changed - Releases include the JAR, Docker TAR, both deployment ZIPs, and the changelog from the same release revision. Publishing requires all five files and their checksums. Existing published release directories are preserved. - Docker and systemd deployment guides now use downloaded, checksum-verified artifacts and list the files needed for standalone installation. - The systemd installer defaults to `/opt/clickstor` and the `clickstor` account. Pass the installation directory, service account, and Java executable to use different settings. The installer validates the generated unit before writing it. ### Fixed - Verify release checksum sidecars over standard input so publishing works on SSH hosts where process substitution paths are unavailable. - Return the result of stopping the systemd service, including when it is already inactive. ### Security - Replace bundled systemd settings with a credential-free template. Docker now binds REST to loopback by default. Set `REST_BIND_ADDRESS` explicitly where a remote HTTPS proxy needs access. Management stays on loopback by default. ## [0.0.1] - 2026-11-27 ### Added - Read-only Java 21 and Spring Boot service for an existing ClickHouse database, with environment-based connection settings and a configurable query timeout. - Archive and tag metadata endpoints at `/api/v1/archives`, `/api/v1/tags`, and `/api/v1/tags/{id}`. Tag lookups support UInt32 IDs, combinable regex filters on tag and archive names and descriptions, and an HTTP 404 for unknown tags requested by ID. - Multi-tag history at `/api/v1/history`, with millisecond timestamps, optional quality values, and series in request order. ClickHouse applies `MIN_MAX` downsampling to numeric and Boolean samples, while preserving actual boundary points and applying Last Value Hold where data permits. String samples retain their original resolution under a separate point limit, and Int64 values are returned as JSON strings to preserve precision. - Configurable history request limits for tag count, numeric point budgets, string point counts, concurrent requests, queue size, and queue wait time. Unknown history tags and invalid input return HTTP 400. On valid tag lists, empty or reversed ranges return empty series without archive reads. String overflow returns HTTP 422, a full or expired queue returns HTTP 503, and history query timeouts return HTTP 504. - Actuator monitoring on a dedicated listener, bound to `127.0.0.1:8081` by default. It provides public liveness, ClickHouse-backed readiness, build information, and Prometheus metrics for HTTP traffic on both listeners, JVM and process activity, history queues, rate limits, and ClickHouse queries. - Opt-in history request timing logs, a standalone benchmark with JSON and CSV output, and tooling to inspect ClickHouse history queries and compare API results with an independent reference. See the [history benchmark guide](docs/history-benchmark.md). - A production Docker image and Compose configuration for an existing ClickHouse instance, with graceful shutdown, a liveness health check, resource and log limits, and documented offline image transfer and rollback. Local scripts also support running the application container against a separate local ClickHouse container. See the [Docker deployment guide](deploy.docker/README.md). - Maven packaging and JAR upload scripts, plus systemd scripts to install and manage the service and select the active JAR. - English and Russian systemd guides covering installation, production configuration, functional checks, troubleshooting, updates, and rollback. - Local scripts for Maven-tested JAR builds, Docker archive builds, and releases with verified SHA-256 checksums and annotated Git tags. ### Changed - Build artifacts use the Maven version and are stored in `dist//`. The site-specific uploader takes an explicit JAR and verifies its checksum before placing it on the server without overwriting a file. - Reduce ClickHouse round trips by checking distinct archive tables once per nonempty history request. Optional numeric batching reads multiple tags of mixed types, including Boolean tags, in one query per eligible archive group. Batch queries compute which tags need downsampling once so ClickHouse can prune raw and downsampled reads by tag ID. The production profile enables batching by default. See the [batch comparison](docs/history-batch-benchmark.md). - **Docker deployment paths changed.** The build script uses `deploy.docker/Dockerfile` with the repository root as context. Select the application or local ClickHouse Compose file under `deploy.docker/` with `--project-directory .` to retain the existing Compose project, network, and volume names. The [English](deploy.docker/README.md) and [Russian](deploy.docker/README.ru.md) guides cover deployment, updates, and rollback. ### Fixed - Return consistent `application/problem+json` responses for REST errors, including missing or malformed parameters, and redact internal details from server error responses. ### Security - Support stateless `X-API-Key` authentication with SHA-256 key hashes and `READ` and `ADMIN` roles. With REST authentication enabled, requests without a valid key return HTTP 401, and clients have independent, configurable per-key quotas that return HTTP 429 when exhausted. Scripts generate keys and populate local environment settings with their hashes. - Require an `ADMIN` key for protected Actuator endpoints even when REST authentication is disabled. The management listener has a separate shared rate limit covering probes and authentication attempts. - Validate archive table names from ClickHouse metadata before using them as escaped SQL identifiers, and bind query values as parameters. - Require REST authentication, distinct `READ` and `ADMIN` key hashes, and explicit ClickHouse connection settings in production. The production profile disables Swagger and OpenAPI endpoints. Docker runs the application as a non-root user with a read-only filesystem and publishes the management port only on host loopback.