rpuch commented on code in PR #1976:
URL: https://github.com/apache/ignite-3/pull/1976#discussion_r1180467747


##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/util/LockHolder.java:
##########
@@ -43,6 +43,7 @@
 
     /**
      * Increment the count of lock holders ({@link Thread}).
+     * Not thread-safe, required external synchronization.

Review Comment:
   ```suggestion
        * Not thread-safe, requires external synchronization.
   ```



##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/util/LockHolder.java:
##########
@@ -52,6 +53,7 @@ void incrementHolders() {
 
     /**
      * Decrements the count of lock holders ({@link Thread}), returns {@code 
true} if there are no more lock holders.
+     * Not thread-safe, required external synchronization.

Review Comment:
   ```suggestion
        * Not thread-safe, requires external synchronization.
   ```



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -70,6 +74,9 @@ public class PartitionListener implements RaftGroupListener {
     /** Logger. */
     private static final IgniteLogger LOG = 
Loggers.forClass(PartitionListener.class);
 
+    /** Empty sorted set. */
+    private static final SortedSet<RowId> EMPTY_SET = new TreeSet<>();

Review Comment:
   Let's wrap it in `unmodifiableSortedSet()`, to make sure noone adds 
anything. This should not hit us hard performance-wise.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to