This is an automated email from the ASF dual-hosted git repository.

apolovtsev pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 29bd72ab542 IGNITE-26287 Upgrade Spotbugs to 4.9.4 (#6477)
29bd72ab542 is described below

commit 29bd72ab542037ad8967c4cb5e64c79e55d79391
Author: Alexander Polovtcev <alex.polovt...@gmail.com>
AuthorDate: Mon Aug 25 15:41:36 2025 +0300

    IGNITE-26287 Upgrade Spotbugs to 4.9.4 (#6477)
---
 check-rules/spotbugs-excludes.xml                           | 13 ++++++++++++-
 gradle/libs.versions.toml                                   |  2 +-
 .../java/org/apache/ignite/raft/jraft/core/ItNodeTest.java  |  1 +
 .../internal/rocksdb/snapshot/RocksSnapshotManager.java     |  7 +++----
 4 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/check-rules/spotbugs-excludes.xml 
b/check-rules/spotbugs-excludes.xml
index 9c5eb1fa96c..031ada26f94 100644
--- a/check-rules/spotbugs-excludes.xml
+++ b/check-rules/spotbugs-excludes.xml
@@ -57,6 +57,12 @@
       <Bug pattern="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN"/>
       <!-- we specifically catch even not thrown exceptions is some places to 
be extra defendant -->
       <Bug pattern="REC_CATCH_EXCEPTION"/>
+      <!-- We assume 64-bit writes to be atomic. -->
+      <Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE"/>
+      <!-- These rules fail a lot because they consider some classes to be not 
thread safe even when they are used with external
+           synchronization or are not used in multithreaded environment at 
all. -->
+      <Bug pattern="AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE"/>
+      <Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE"/>
     </Or>
   </Match>
   <Match>
@@ -185,7 +191,7 @@
     <Source name="DistributionZoneRebalanceEngine.java"/>
   </Match>
   <Match>
-    <!-- wait/notify condition is atomic, so there is n need to put it into 
synchronized block for performance reasons -->
+    <!-- wait/notify condition is atomic, so there is no need to put it into 
synchronized block for performance reasons -->
     <Bug pattern="NN_NAKED_NOTIFY"/>
     <Class 
name="org.apache.ignite.internal.pagememory.persistence.checkpoint.Checkpointer"/>
     <Method name="cancel"/>
@@ -255,6 +261,11 @@
       <Field name="PENDING_CHANGE_TRIGGER_PREFIX_BYTES"/>
     </Or>
   </Match>
+  <Match>
+    <!-- This class is not a singleton. -->
+    <Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR"/>
+    <Class 
name="org.apache.ignite.internal.partition.replicator.schema.TableDefinitionDiff"/>
+  </Match>
   <!-- end of false-positive exclusions -->
 
 
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 9b5e1dd9980..daae8068d63 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -99,7 +99,7 @@ cytodynamics = "0.2.0"
 pmdTool = "7.13.0"
 # NOTE: do not update checlstyle to 11.x.x+, because newer versions are not 
compatible with Java 11.
 checkstyleTool = "10.26.1"
-spotbugsTool = "4.8.3"
+spotbugsTool = "4.9.4"
 
 [plugins]
 openapiGenerator = "org.openapi.generator:7.12.0"
diff --git 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
index 25aacb045dc..420ab3aff95 100644
--- 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
+++ 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
@@ -3990,6 +3990,7 @@ public class ItNodeTest extends BaseIgniteAbstractTest {
         });
     }
 
+    @Disabled("https://issues.apache.org/jira/browse/IGNITE-26249";)
     @Test
     public void testChangePeersAndLearnersChaosWithSnapshot() throws Exception 
{
         // start cluster
diff --git 
a/modules/rocksdb-common/src/main/java/org/apache/ignite/internal/rocksdb/snapshot/RocksSnapshotManager.java
 
b/modules/rocksdb-common/src/main/java/org/apache/ignite/internal/rocksdb/snapshot/RocksSnapshotManager.java
index 58ca260fb3f..51643d52614 100644
--- 
a/modules/rocksdb-common/src/main/java/org/apache/ignite/internal/rocksdb/snapshot/RocksSnapshotManager.java
+++ 
b/modules/rocksdb-common/src/main/java/org/apache/ignite/internal/rocksdb/snapshot/RocksSnapshotManager.java
@@ -155,7 +155,8 @@ public class RocksSnapshotManager {
                 EnvOptions envOptions = new EnvOptions();
                 Options options = new Options().setEnv(db.getEnv());
                 SstFileWriter sstFileWriter = new SstFileWriter(envOptions, 
options);
-                RocksIterator it = snapshotIterator(range, snapshot)
+                ReadOptions readOptions = new 
ReadOptions().setSnapshot(snapshot);
+                RocksIterator it = rangeIterator(range, readOptions)
         ) {
             Path sstFile = snapshotDir.resolve(range.columnFamily().name());
 
@@ -172,9 +173,7 @@ public class RocksSnapshotManager {
     /**
      * Creates an iterator over the provided key range.
      */
-    private static RocksIterator snapshotIterator(ColumnFamilyRange range, 
Snapshot snapshot) {
-        var options = new ReadOptions().setSnapshot(snapshot);
-
+    private static RocksIterator rangeIterator(ColumnFamilyRange range, 
ReadOptions options) {
         if (range.isFullRange()) {
             RocksIterator it = range.columnFamily().newIterator(options);
 

Reply via email to