Skip to content

fix tests

c0a29b1
Select commit
Loading
Failed to load commit list.
Merged

#3730 feat: Raft-based High Availability using Apache Ratis #3731

fix tests
c0a29b1
Select commit
Loading
Failed to load commit list.
Codacy Production / Codacy Static Code Analysis required action Apr 21, 2026 in 0s

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

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

Issues
======
- Added 40
           

Complexity increasing per file
==============================
- server/src/main/java/com/arcadedb/server/security/ServerSecurity.java  7
- network/src/main/java/com/arcadedb/network/binary/QuorumNotReachedException.java  1
- server/src/main/java/com/arcadedb/server/ArcadeDBServer.java  8
- server/src/main/java/com/arcadedb/server/http/handler/DatabaseAbstractHandler.java  12
- server/src/main/java/com/arcadedb/server/http/HttpServer.java  4
- engine/src/main/java/com/arcadedb/GlobalConfiguration.java  3
- engine/src/main/java/com/arcadedb/graph/GraphEngine.java  3
- network/src/main/java/com/arcadedb/remote/RemoteDatabase.java  10
- server/src/main/java/com/arcadedb/server/http/handler/PostServerCommandHandler.java  32
- server/src/main/java/com/arcadedb/server/http/handler/AbstractServerHttpHandler.java  29
- network/src/main/java/com/arcadedb/remote/RemoteHttpComponent.java  17
- server/src/main/java/com/arcadedb/server/plugin/PluginManager.java  6
- load-tests/src/test/java/com/arcadedb/test/support/ContainersTestTemplate.java  45
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.java  112
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryCodec.java  44
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftReplicatedDatabase.java  94
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftLogEntryType.java  5
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java  154
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotManager.java  12
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.java  65
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/ClusterMonitor.java  12
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/GetClusterHandler.java  8
- ha-raft/src/test/java/com/arcadedb/server/ha/raft/RaftHAInsertBenchmark.java  57
- 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  40
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotHttpHandler.java  49
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/HALog.java  9
- server/src/main/java/com/arcadedb/server/HAReplicatedDatabase.java  5
- server/src/main/java/com/arcadedb/server/network/DefaultServerSocketFactory.java  1
- server/src/main/java/com/arcadedb/server/HAServerPlugin.java  16
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostStepDownHandler.java  3
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostTransferLeaderHandler.java  6
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/DeletePeerHandler.java  5
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostLeaveHandler.java  3
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostAddPeerHandler.java  7
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostVerifyDatabaseHandler.java  46
- server/src/main/java/com/arcadedb/server/http/handler/LeaderProxy.java  27
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/HealthMonitor.java  11
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/ReplicationException.java  2
- ha-raft/src/test/java/com/arcadedb/server/ha/raft/RaftClusterStarter.java  17
- 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  25
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/SnapshotInstaller.java  76
- 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  42
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftPropertiesBuilder.java  2
- 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  36
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftTransactionBroker.java  8
- ha-raft/src/test/java/com/arcadedb/server/ha/raft/ClusterDatabaseChecker.java  1
- server/src/main/java/com/arcadedb/server/http/IdempotencyCache.java  21
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/PeerAddressAllowlistFilter.java  26
- ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftGrpcServicesCustomizer.java  4
- engine/src/main/java/com/arcadedb/database/DatabaseComparatorErrorsReporter.java  41
         

Complexity decreasing per file
==============================
+ engine/src/main/java/com/arcadedb/schema/LocalDocumentType.java  -8
         

See the complete overview on Codacy

Annotations

Check notice on line 46 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#L46

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

Check warning on line 291 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.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/ArcadeStateMachine.java#L291

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

Check warning on line 389 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.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/ArcadeStateMachine.java#L389

Avoid throwing raw exception types.

Check warning on line 412 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.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/ArcadeStateMachine.java#L412

Avoid throwing raw exception types.

Check warning on line 462 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.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/ArcadeStateMachine.java#L462

Avoid unused method parameters such as 'entryIndex'.

Check warning on line 513 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.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/ArcadeStateMachine.java#L513

Avoid unused method parameters such as 'entryIndex'.

Check warning on line 573 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.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/ArcadeStateMachine.java#L573

Avoid throwing raw exception types.

Check warning on line 629 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.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/ArcadeStateMachine.java#L629

Avoid throwing raw exception types.

Check warning on line 163 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#L163

Avoid throwing raw exception types.

Check notice on line 47 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/HealthMonitor.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/HealthMonitor.java#L47

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

Check notice on line 48 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/HealthMonitor.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/HealthMonitor.java#L48

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

Check notice on line 49 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/HealthMonitor.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/HealthMonitor.java#L49

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

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 warning on line 41 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftClusterStatusExporter.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/RaftClusterStatusExporter.java#L41

Avoid unused private fields such as 'LAG_MONITOR_INITIAL_DELAY_SECS'.

Check warning on line 42 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftClusterStatusExporter.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/RaftClusterStatusExporter.java#L42

Avoid unused private fields such as 'LAG_MONITOR_INTERVAL_SECS'.

Check warning on line 81 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.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/RaftHAPlugin.java#L81

Avoid throwing raw exception types.

Check warning on line 193 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.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/RaftHAPlugin.java#L193

Avoid throwing raw exception types.

Check notice on line 220 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.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/RaftHAPlugin.java#L220

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

Check warning on line 221 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.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/RaftHAPlugin.java#L221

Avoid throwing raw exception types.

Check warning on line 274 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.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/RaftHAPlugin.java#L274

Avoid throwing raw exception types.

Check notice on line 177 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftReplicatedDatabase.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/RaftReplicatedDatabase.java#L177

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

Check notice on line 178 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftReplicatedDatabase.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/RaftReplicatedDatabase.java#L178

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

Check notice on line 179 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftReplicatedDatabase.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/RaftReplicatedDatabase.java#L179

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

Check warning on line 331 in ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftReplicatedDatabase.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/RaftReplicatedDatabase.java#L331

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