maedhroz commented on code in PR #3054:
URL: https://github.com/apache/cassandra/pull/3054#discussion_r1459661987


##########
src/java/org/apache/cassandra/index/sai/disk/RowMapping.java:
##########
@@ -173,18 +166,15 @@ public void add(PrimaryKey key, long sstableRowId) throws 
InMemoryTrie.SpaceExha
 
         maxSSTableRowId = Math.max(maxSSTableRowId, sstableRowId);
 
-        // data is written in token sorted order
-        if (minKey == null)
-            minKey = key;
-        maxKey = key;
+        updateMinMaxKeys(key);
         count++;
     }
 
     /**
-     * Returns the SSTable row Id for a {@link PrimaryKey}
+     * Returns the SSTable row ID for a {@link PrimaryKey}
      *
      * @param key the {@link PrimaryKey}
-     * @return a valid SSTable row Id for the {@link PrimaryKey} or -1 if the 
{@link PrimaryKey} doesn't exist
+     * @return a valid SSTable row ID for the {@link PrimaryKey} or -1 if the 
{@link PrimaryKey} doesn't exist

Review Comment:
   I'm OCD about using all-caps `ID` in comments :)



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to