Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
bdc165a
fix: Not a JSON Array: "admin" for non-root users
lvca Apr 5, 2026
64590a8
feat: replaced native Raft module with Apache Ratis
lvca Apr 5, 2026
a3618fd
Merge branch 'main' into apache-ratis
lvca Apr 5, 2026
32d9cc6
fix: HA -> fixed reconnect from clientx
lvca Apr 5, 2026
def609b
feat: studio, added HA metrics + callback on node leave
lvca Apr 5, 2026
da225d2
feat: implemented customizable consistency
lvca Apr 5, 2026
5a234e9
feat: added missing features from @robfrank branch
lvca Apr 5, 2026
cf9e2de
feat: integrated cluster monitor in studio
lvca Apr 5, 2026
1c07a3c
test: added more test from @robfrank
lvca Apr 5, 2026
288dbce
test: added Toxiproxy
lvca Apr 5, 2026
6be2da5
chore: updated to latest toxiproxy
lvca Apr 5, 2026
088a5e7
perf: added ha insert benchmark
lvca Apr 5, 2026
0cc756b
perf: HA -> added benchmark and group committer
lvca Apr 5, 2026
40e78dc
Merge branch 'main' into apache-ratis
lvca Apr 6, 2026
9a69eb0
fix: applied recommendation from code review
lvca Apr 6, 2026
c84dea0
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
f3e64d3
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
8cb0aa1
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
c68a9bc
Update arcadedb-ha-26.4.1.md
lvca Apr 6, 2026
e25ef3e
test: fixed test cases
lvca Apr 6, 2026
90c9909
test: fixed failing
lvca Apr 6, 2026
e6326fc
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
987087f
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
b2bad51
Merge branch 'main' into apache-ratis
lvca Apr 6, 2026
85a0bfb
test: adapted ha tests to dynamic leader election
lvca Apr 6, 2026
120bcb7
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
78a7f21
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
d2b8501
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
7c398c7
Fixed replication of vector indexes
lvca Apr 6, 2026
0d6a063
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
18ced57
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
600d4c4
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 6, 2026
22d6245
Merge branch 'main' into apache-ratis
lvca Apr 6, 2026
f09b2c7
fix: GAV race condition
lvca Apr 6, 2026
8c4fcce
fix: support for BATCH in sql UPDATE and DELETE
lvca Apr 6, 2026
f7b2db7
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 7, 2026
b54742e
Merge branch 'main' into apache-ratis
lvca Apr 7, 2026
dd322a0
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 7, 2026
1c3402f
test: added new test case to check hot resync by using Docker
lvca Apr 7, 2026
b1c33b8
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 7, 2026
d11e919
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 7, 2026
26cd45d
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 7, 2026
e58da6b
New e2e HA tests
lvca Apr 7, 2026
b912455
fix: HA -> implemented latest recommendation from claude code review
lvca Apr 7, 2026
8291365
fix: missing snapshot save
lvca Apr 7, 2026
8617773
Merge branch 'main' into apache-ratis
lvca Apr 7, 2026
d7784e8
fix: HA issues from latest tests
lvca Apr 7, 2026
1771121
Merge branch 'main' into apache-ratis
lvca Apr 7, 2026
25606fe
Update HARollingRestartE2ETest.java
lvca Apr 7, 2026
9e6aa28
Fixed ha state machine
lvca Apr 7, 2026
b62a331
Merge branch 'main' into apache-ratis
lvca Apr 7, 2026
e591894
Many fixes in HA
lvca Apr 7, 2026
f2e9885
ha: small issues fixed
lvca Apr 7, 2026
55155b1
Fixed race condition
lvca Apr 7, 2026
7a1dc54
Update AbstractServerHttpHandler.java
lvca Apr 7, 2026
43bc7ed
Implemented recommendation from code review
lvca Apr 7, 2026
73a5b2b
fix: snapshot recovery race condition
lvca Apr 7, 2026
f5753f2
Added validation
lvca Apr 7, 2026
22ae6ec
Fixed port http/ha
lvca Apr 7, 2026
159f775
fix: READ_CONSISTENCY_CONTEXT ThreadLocal may leak
lvca Apr 7, 2026
fda4b8b
Fixed ipv6 parsing
lvca Apr 7, 2026
3963989
Upgraded to Apache Ratis 3.2.2
lvca Apr 7, 2026
b33eba3
More fixes in HA module
lvca Apr 7, 2026
b0743af
Minor fixes in HA module
lvca Apr 7, 2026
138f7d3
Last HA fixes
lvca Apr 7, 2026
8f36ea6
Update HARollingRestartE2ETest.java
lvca Apr 8, 2026
c25e831
Refactoring: removed TRANSACTION_FORWARD message
lvca Apr 8, 2026
8cad2cf
Fixed ha issue with ratis
lvca Apr 8, 2026
a8276c5
Printed cluster table at cluster change of status
lvca Apr 8, 2026
4f77f00
Update arcadedb-ha-26.4.1.md
lvca Apr 8, 2026
1a8906c
Adapted tests from ha-redesign by @robfrank
lvca Apr 8, 2026
6d76fcf
HA fixes
lvca Apr 8, 2026
fbb8ce0
Changed cluster table log level
lvca Apr 8, 2026
d0e4e13
Small performance optimizations
lvca Apr 8, 2026
708935b
Merge branch 'main' into apache-ratis
lvca Apr 8, 2026
2cacd59
test: added HA test case
lvca Apr 8, 2026
4c299fb
More fixes
lvca Apr 8, 2026
8373a61
test: added more tests from ha-redesign by @robfrank
lvca Apr 9, 2026
5a7ba76
Deleted toxiproxy because can't be used with Ratis
lvca Apr 9, 2026
e08097c
feat: implemented linearizable distributed read consistency
lvca Apr 9, 2026
d2bec76
Fixed all recommendation from code review
lvca Apr 9, 2026
021f2c9
Removed unused COMMAND_FORWARD (now all going through http)
lvca Apr 9, 2026
8b308c3
Added more fixes in HA module
lvca Apr 9, 2026
4e1ca3b
Added more fixes
lvca Apr 9, 2026
dd5a43f
HA: more fixes
lvca Apr 9, 2026
09c7f9c
Improved security
lvca Apr 10, 2026
f4472c1
Removed unused code
lvca Apr 10, 2026
c5058f0
Merge branch 'main' into apache-ratis
lvca Apr 10, 2026
0227960
Merge branch 'main' into apache-ratis
lvca Apr 11, 2026
da3ddda
HA: fIxed edge cases, improved security
lvca Apr 11, 2026
f9dd83a
Added k8s network policy (missing)
lvca Apr 11, 2026
657ce11
Stop is not executed by an external thread
lvca Apr 11, 2026
418cf45
Added extra protection + docs
lvca Apr 11, 2026
2aa8725
Added more tests
lvca Apr 11, 2026
a5131ea
Restored deleted files
lvca Apr 12, 2026
0570e9f
Merge branch 'main' into apache-ratis
lvca Apr 12, 2026
5c483ee
Took good ideas from ha-redesign branch
lvca Apr 13, 2026
d7a6a62
Fixed issue after refactoring
lvca Apr 13, 2026
940537b
HA: fixed issues after latest refactoring
lvca Apr 13, 2026
d52f160
Ratis State machine, managed watchdog in a registered thread
lvca Apr 13, 2026
85efc37
Fixed more issues, added more javadocs
lvca Apr 13, 2026
f783fe6
Merge branch 'main' into apache-ratis
lvca Apr 13, 2026
50adc1a
HA speed optimizations
lvca Apr 13, 2026
77730b6
HA: mega refactoring to keep classes lighter and improve responsibility
lvca Apr 13, 2026
e29a5a2
More refactoring and added tests from `ha-redesign` branch (by @robfr…
lvca Apr 13, 2026
60e048e
Merge branch 'main' into apache-ratis
lvca Apr 13, 2026
a66902c
Completed refactoring
lvca Apr 13, 2026
16668a8
removed dead code
lvca Apr 13, 2026
8abc01b
Merge branch 'main' into apache-ratis
lvca Apr 13, 2026
9c5ad5e
Small fixes
lvca Apr 13, 2026
f5820db
Moved HAInsertBenchmark class
lvca Apr 13, 2026
595bb01
Removed sleep in tests
lvca Apr 13, 2026
1246a1d
Updated docs, improved minor issues
lvca Apr 13, 2026
1afd277
Separated HealthMonitor and LeaderProxy
lvca Apr 13, 2026
23f4086
Implemented more fixes
lvca Apr 13, 2026
1419a79
HA: added more fixes
lvca Apr 14, 2026
35b7bee
Improved mgmt of edge cases
lvca Apr 14, 2026
c961ee9
Fixed minor issues
lvca Apr 14, 2026
ca75f43
Fixed edge cases
lvca Apr 14, 2026
f67132d
Update PostVerifyDatabaseHandler.java
lvca Apr 14, 2026
bb1a943
Refactoring of HAServer
lvca Apr 14, 2026
b9d09b3
Minor fixes
lvca Apr 14, 2026
12e532e
More fixes
lvca Apr 14, 2026
a0cdf13
HA refactoring of packages
lvca Apr 14, 2026
c8cef1e
Merge branch 'main' into apache-ratis
lvca Apr 14, 2026
23265f8
Add new global config for ha snapshot write
lvca Apr 14, 2026
392b178
Better docs
lvca Apr 14, 2026
28e556c
Merge branch 'main' into apache-ratis
lvca Apr 14, 2026
e69e52d
Changed the WALVersionGapException catch block to re-throw as Replica…
lvca Apr 14, 2026
f99fdcc
Added more tests
lvca Apr 14, 2026
1bfa330
HA: added extra security
lvca Apr 14, 2026
d8608f2
Added more fixes
lvca Apr 14, 2026
fb15431
Added replication of users
lvca Apr 14, 2026
14f4491
Minor fixes
lvca Apr 15, 2026
610f9ea
Minor improvements
lvca Apr 15, 2026
9c02fe6
HA: small fixes
lvca Apr 15, 2026
be3ba69
Merge branch 'main' into apache-ratis
lvca Apr 16, 2026
0cc1f5b
Merge branch 'main' into apache-ratis
lvca Apr 17, 2026
87e5511
Update SingleLocalhostServerSimpleLoadTestIT.java
lvca Apr 17, 2026
a494fb6
Fixed replication
lvca Apr 17, 2026
26d517a
Added extra safety on HA client
lvca Apr 17, 2026
9c1c2fb
Implemented Idempotency cache to avoid repeating non idempotent requests
lvca Apr 17, 2026
51f7d06
ha: fixed another corner case
lvca Apr 17, 2026
ff7eff2
HA: added HA_SNAPSHOT_WATCHDOG_TIMEOUT
lvca Apr 17, 2026
3d3aa68
HA minor fixes
lvca Apr 17, 2026
8d2f460
HA: added basic security in nodes
lvca Apr 17, 2026
1bd497a
HA: added more check for edge cases
lvca Apr 17, 2026
d73700b
HA: step down in case of failure instead of suicide
lvca Apr 17, 2026
33b0f10
HA: fixed timeout
lvca Apr 17, 2026
6db1e2a
HA: protected concurrent requests during snapshot installation with a…
lvca Apr 17, 2026
6568298
HA: added more tests
lvca Apr 17, 2026
8e7444f
fix: Linearizable reads on followers (ReadIndex wiring) + test: added…
lvca Apr 17, 2026
7a8423d
HA: added more integration test
lvca Apr 17, 2026
f5af9c1
HA: new tests and fixes
lvca Apr 17, 2026
ed79673
HA: minor fixes
lvca Apr 17, 2026
88cea6b
Merge branch 'main' into apache-ratis
lvca Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/e2e-ha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: E2E HA Tests

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Runs daily at midnight
pull_request:
branches:
- main

jobs:
setup:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
attestations: write
id-token: write

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@471d5ace1f08e3c4df1c4c2f7e6341aa75da434a # v5.0.3
- name: Run pre-commit
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13.0"
cache: "pip"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21

- name: Cache local Maven repository
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0

- name: Build and package with Maven Docker profile
run: ./mvnw clean install -Pdocker -DskipTests --batch-mode --errors --show-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run HA Tests
run: ./mvnw verify -DskipTests -Pintegration --batch-mode --errors --fail-never --show-version -pl e2e-ha
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Tests Reporter
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
if: success() || failure()
with:
name: IT Tests Report
path: "**/failsafe-reports/TEST*.xml"
list-tests: "failed"
list-suites: "failed"
reporter: java-junit
15 changes: 15 additions & 0 deletions ATTRIBUTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,21 @@ The following table lists runtime dependencies bundled with ArcadeDB distributio
| io.undertow | undertow-core | ~2.3.x | Apache 2.0 | https://undertow.io/ |
| io.netty | netty-* | ~4.1.x | Apache 2.0 | https://netty.io/ |

### Apache Ratis (High Availability)

| Group ID | Artifact ID | Version | License | Homepage |
|----------|-------------|---------|---------|----------|
| org.apache.ratis | ratis-server | 3.2.2 | Apache 2.0 | https://ratis.apache.org/ |
| org.apache.ratis | ratis-grpc | 3.2.2 | Apache 2.0 | https://ratis.apache.org/ |
| org.apache.ratis | ratis-common | 3.2.2 | Apache 2.0 | https://ratis.apache.org/ |
| org.apache.ratis | ratis-client | 3.2.2 | Apache 2.0 | https://ratis.apache.org/ |
| org.apache.ratis | ratis-server-api | 3.2.2 | Apache 2.0 | https://ratis.apache.org/ |
| org.apache.ratis | ratis-proto | 3.2.2 | Apache 2.0 | https://ratis.apache.org/ |
| org.apache.ratis | ratis-metrics-default | 3.2.2 | Apache 2.0 | https://ratis.apache.org/ |
| org.apache.ratis | ratis-thirdparty-misc | 1.0.10 | Apache 2.0 | https://ratis.apache.org/ |

**Apache Ratis Notice:** Apache Ratis is a Java library for building fault-tolerant distributed systems using the Raft consensus algorithm. It provides the foundation for ArcadeDB's High Availability clustering. Apache Ratis, Ratis, Apache, the Apache feather, and the Apache Ratis project logo are trademarks of The Apache Software Foundation.

### Apache TinkerPop / Gremlin (Optional Module)

| Group ID | Artifact ID | Version | License | Homepage |
Expand Down
21 changes: 19 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ cd package
- `DatabaseAbstractHandler.java` — base handler (wraps commands in transactions)
- `PostCommandHandler.java` — POST /command endpoint
- `PostQueryHandler.java`, `GetQueryHandler.java` — query endpoints
- **HA**: `server/src/main/java/com/arcadedb/server/ha/`
- **HA (Ratis)**: `ha-raft/src/main/java/com/arcadedb/server/ha/raft/`
- `RaftHAServer.java` - Ratis server lifecycle, peer management, cluster token, health monitor
- `ArcadeDBStateMachine.java` - Ratis state machine for WAL replication on followers
- `RaftGroupCommitter.java` - batched group commit over Raft (amortizes gRPC round-trips)
- `RaftLogEntryCodec.java` - binary serialization for Raft log entries
- `SnapshotHttpHandler.java` - HTTP endpoint for full database snapshot download
- `ClusterMonitor.java` - follower lag tracking and alerts
- `HALog.java` - verbose HA logging (`arcadedb.ha.logVerbose=0/1/2/3`)
- **Security**: `server/src/main/java/com/arcadedb/server/security/`

### Test Locations (by module)
Expand Down Expand Up @@ -206,10 +213,20 @@ cd package
- **Index System**: `com.arcadedb.index.*` - LSM-Tree indexes, full-text, vector indexes
- **Graph Engine**: `com.arcadedb.graph.*` - Vertex/Edge management, graph traversals
- **Serialization**: `com.arcadedb.serializer.*` - Binary serialization, JSON handling
- **Remote Client**: `com.arcadedb.remote.*` (module: `network/`) - `RemoteDatabase` / `RemoteServer` / `RemoteSchema` wrap the HTTP API. `RemoteDatabase` is **thread-safe for sharing across threads**: `RemoteSchema` uses a synchronized `reload()` with volatile snapshot-swap, and `RemoteHttpComponent.httpCommand` is stateless per call. See `server/src/test/java/com/arcadedb/server/RemoteSchemaConcurrentInitIT.java` for the regression test.
- `RemoteHttpComponent` wraps `HttpClient.sendAsync` in a watchdog that enforces `timeout + NETWORK_HTTP_CLIENT_WATCHDOG_SLACK` as a hard wall-clock bound (defense against JDK HttpClient stuck HTTP/2 streams).
- Non-idempotent methods (POST/PUT/DELETE) are **not** auto-retried on raw `IOException` because the request may have been committed with only the response lost; retrying would duplicate the write. `NeedRetryException` (explicitly declared by the server as "I did not commit") is still retried for all methods.

### Server Components
- **HTTP API**: `com.arcadedb.server.http.*` - REST endpoints, request handling
- **High Availability**: `com.arcadedb.server.ha.*` - Clustering, replication, leader election
- **High Availability**: `com.arcadedb.server.ha.raft.*` (module: `ha-raft/`) - Clustering via Apache Ratis, WAL replication, leader election
- `RaftHAServer.java` - Ratis server lifecycle, gRPC transport, peer management, cluster token
- `ArcadeDBStateMachine.java` - Ratis state machine for WAL replication on followers
- `RaftGroupCommitter.java` - batched group commit over Raft (amortizes gRPC round-trips)
- `RaftLogEntryCodec.java` - binary serialization for Raft log entries
- `SnapshotHttpHandler.java` - HTTP endpoint for full database snapshot download
- `ClusterMonitor.java` - follower lag tracking and alerts
- `HALog.java` - verbose HA logging (`arcadedb.ha.logVerbose=0/1/2/3`: off/basic/detailed/trace)
- **Security**: `com.arcadedb.server.security.*` - Authentication, authorization
- **Monitoring**: `com.arcadedb.server.monitor.*` - Metrics, query profiling, health checks
- **MCP**: `com.arcadedb.server.mcp.*` - Model Context Protocol server support
Expand Down
3 changes: 3 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Copyright 2012-2021 The ANTLR Project
Apache TinkerPop (Gremlin)
Copyright 2015-2024 The Apache Software Foundation

Apache Ratis
Copyright 2017-2026 The Apache Software Foundation

Apache Commons Compress
Copyright 2002-2024 The Apache Software Foundation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.arcadedb.log.LogManager;
import com.arcadedb.server.ArcadeDBServer;
import com.arcadedb.server.ServerException;
import com.arcadedb.server.ha.network.ServerSocketFactory;
import com.arcadedb.server.network.ServerSocketFactory;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.arcadedb.GlobalConfiguration;
import com.arcadedb.server.ArcadeDBServer;
import com.arcadedb.server.ServerPlugin;
import com.arcadedb.server.ha.network.DefaultServerSocketFactory;
import com.arcadedb.server.network.DefaultServerSocketFactory;

/**
* Server plugin that enables Neo4j BOLT protocol support.
Expand Down
Loading
Loading