You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "denis-chudov (via GitHub)" <gi...@apache.org> on 2023/05/16 16:26:58 UTC

[GitHub] [ignite-3] denis-chudov commented on a diff in pull request #2074: IGNITE-19329 Tx. POSITIVE_INF inside SortedIndexLocker is not unique …

denis-chudov commented on code in PR #2074:
URL: https://github.com/apache/ignite-3/pull/2074#discussion_r1195405985


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/SortedIndexLocker.java:
##########
@@ -66,12 +75,33 @@ public class SortedIndexLocker implements IndexLocker {
      * @param storage A storage of an index this locker is created for.
      * @param indexRowResolver A convertor which derives an index key from given table row.
      */
-    public SortedIndexLocker(UUID indexId, LockManager lockManager, SortedIndexStorage storage,
+    public SortedIndexLocker(UUID indexId, int partId, LockManager lockManager, SortedIndexStorage storage,

Review Comment:
   please add new argument to javadoc



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/SortedIndexLocker.java:
##########
@@ -66,12 +75,33 @@ public class SortedIndexLocker implements IndexLocker {
      * @param storage A storage of an index this locker is created for.
      * @param indexRowResolver A convertor which derives an index key from given table row.
      */
-    public SortedIndexLocker(UUID indexId, LockManager lockManager, SortedIndexStorage storage,
+    public SortedIndexLocker(UUID indexId, int partId, LockManager lockManager, SortedIndexStorage storage,
             Function<BinaryRow, BinaryTuple> indexRowResolver) {
         this.indexId = indexId;
         this.lockManager = lockManager;
         this.storage = storage;
         this.indexRowResolver = indexRowResolver;
+
+        this.positiveInf = createInfinitelyBoundary(partId, indexId);
+    }
+
+    /**
+     * Creates a tuple for positive infinity boundary.
+     *
+     * @param partId Partition id.
+     * @param indexId Index id.
+     * @return Infinity binary tuple.
+     */
+    private static BinaryTuple createInfinitelyBoundary(int partId, UUID indexId) {

Review Comment:
   ```suggestion
       private static BinaryTuple createInfiniteBoundary(int partId, UUID indexId) {
   ```



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org