Skip to content

Merge branch 'main' into apache-ratis

88cea6b
Select commit
Loading
Failed to load commit list.
Closed

Replace custom Raft protocol with Apache Ratis #3798

Merge branch 'main' into apache-ratis
88cea6b
Select commit
Loading
Failed to load commit list.
Codacy Production / Codacy Static Code Analysis required action Apr 17, 2026 in 0s

48 new issues (0 max.) of at least severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 48
           

Complexity increasing per file
==============================
- server/src/main/java/com/arcadedb/server/ArcadeDBServer.java  9
- server/src/main/java/com/arcadedb/server/http/handler/DatabaseAbstractHandler.java  14
- server/src/main/java/com/arcadedb/server/http/HttpServer.java  4
- server/src/main/java/com/arcadedb/server/http/handler/PostServerCommandHandler.java  15
- server/src/main/java/com/arcadedb/server/http/handler/AbstractServerHttpHandler.java  42
- network/src/main/java/com/arcadedb/remote/RemoteHttpComponent.java  20
- server/src/main/java/com/arcadedb/server/plugin/PluginManager.java  11
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java  50
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryType.java  9
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java  185
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.java  47
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/ClusterMonitor.java  16
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/GetClusterHandler.java  3
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/Quorum.java  3
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftGroupCommitter.java  50
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotHttpHandler.java  56
- server/src/main/java/com/arcadedb/server/network/DefaultServerSocketFactory.java  1
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostAddPeerHandler.java  9
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostVerifyDatabaseHandler.java  46
- server/src/main/java/com/arcadedb/server/http/handler/LeaderProxy.java  29
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/HealthMonitor.java  6
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeDBStateMachine.java  147
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java  75
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/KubernetesAutoJoin.java  27
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftPeerAddressResolver.java  56
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java  83
- ha-raft/src/test/java/com/arcadedb/server/ha/raft/HAInsertBenchmark.java  59
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/MajorityCommittedAllFailedException.java  2
- engine/src/main/java/com/arcadedb/exception/WALVersionGapException.java  1
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftClusterManager.java  33
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftPropertiesBuilder.java  7
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/ClusterTokenProvider.java  28
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftClusterStatusExporter.java  48
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftTransactionBroker.java  22
- server/src/main/java/com/arcadedb/server/HAPlugin.java  12
- server/src/main/java/com/arcadedb/server/ReadConsistencyContext.java  4
- server/src/main/java/com/arcadedb/server/http/IdempotencyCache.java  21
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PeerAddressAllowlistFilter.java  24
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftGrpcServicesCustomizer.java  4
         

Complexity decreasing per file
==============================
+ server/src/main/java/com/arcadedb/server/http/handler/GetServerHandler.java  -7
         

See the complete overview on Codacy

Annotations

Check warning on line 183 in e2e/src/test/java/com/arcadedb/e2e/ArcadeHAContainerTemplate.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

e2e/src/test/java/com/arcadedb/e2e/ArcadeHAContainerTemplate.java#L183

Avoid throwing raw exception types.

Check notice on line 50 in engine/src/main/java/com/arcadedb/database/Database.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

engine/src/main/java/com/arcadedb/database/Database.java#L50

The enum name 'READ_CONSISTENCY' doesn't match '[A-Z][a-zA-Z0-9]*'

Check warning on line 363 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeDBStateMachine.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeDBStateMachine.java#L363

An instanceof check is being performed on the caught exception.  Create a separate catch clause for this exception type.

Check notice on line 868 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeDBStateMachine.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeDBStateMachine.java#L868

Unnecessary use of fully qualified name 'org.apache.ratis.proto.RaftProtos.RaftConfigurationProto' due to existing import 'org.apache.ratis.proto.RaftProtos'

Check notice on line 889 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeDBStateMachine.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeDBStateMachine.java#L889

Unnecessary use of fully qualified name 'org.apache.ratis.proto.RaftProtos.RoleInfoProto' due to existing import 'org.apache.ratis.proto.RaftProtos'

Check warning on line 166 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ClusterTokenProvider.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ClusterTokenProvider.java#L166

Avoid throwing raw exception types.

Check warning on line 67 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/KubernetesAutoJoin.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/KubernetesAutoJoin.java#L67

Avoid unused private fields such as 'server'.

Check warning on line 67 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/KubernetesAutoJoin.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/KubernetesAutoJoin.java#L67

Perhaps 'server' could be replaced by a local variable.

Check notice on line 433 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java#L433

Unnecessary use of fully qualified name 'java.util.logging.Level' due to existing import 'java.util.logging.Level'

Check notice on line 437 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java#L437

Unnecessary use of fully qualified name 'java.util.logging.Level.SEVERE' due to existing import 'java.util.logging.Level'

Check notice on line 236 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java#L236

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 242 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java#L242

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 243 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java#L243

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 244 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java#L244

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check warning on line 104 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java#L104

Avoid unused private fields such as 'timeout'.

Check warning on line 104 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java#L104

Perhaps 'timeout' could be replaced by a local variable.

Check warning on line 233 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java#L233

An instanceof check is being performed on the caught exception.  Create a separate catch clause for this exception type.

Check notice on line 359 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java#L359

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 360 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java#L360

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check warning on line 808 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicatedDatabase.java#L808

Avoid long parameter lists.

Check warning on line 290 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotHttpHandler.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotHttpHandler.java#L290

Avoid throwing raw exception types.

Check notice on line 120 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java#L120

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 122 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java#L122

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 123 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java#L123

Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Check notice on line 444 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java#L444

Unnecessary use of fully qualified name 'java.io.InputStream' due to existing import 'java.io.InputStream'