You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "ekaterinadimitrova2 (via GitHub)" <gi...@apache.org> on 2024/02/09 22:40:28 UTC

[PR] C 19168 5.0 [cassandra]

ekaterinadimitrova2 opened a new pull request, #3097:
URL: https://github.com/apache/cassandra/pull/3097

   Thanks for sending a pull request! Here are some tips if you're new here:
    
    * Ensure you have added or run the [appropriate tests](https://cassandra.apache.org/_/development/testing.html) for your PR.
    * Be sure to keep the PR description updated to reflect all changes.
    * Write your PR title to summarize what this PR proposes.
    * If possible, provide a concise example to reproduce the issue for a faster review.
    * Read our [contributor guidelines](https://cassandra.apache.org/_/development/index.html)
    * If you're making a documentation change, see our [guide to documentation contribution](https://cassandra.apache.org/_/development/documentation.html)
    
   Commit messages should follow the following format:
   
   ```
   <One sentence description, usually Jira title or CHANGES.txt summary>
   
   <Optional lengthier description (context on patch)>
   
   patch by <Authors>; reviewed by <Reviewers> for CASSANDRA-#####
   
   Co-authored-by: Name1 <email1>
   Co-authored-by: Name2 <email2>
   
   ```
   
   The [Cassandra Jira](https://issues.apache.org/jira/projects/CASSANDRA/issues/)
   
   


-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] C 19168 5.0 [cassandra]

Posted by "ekaterinadimitrova2 (via GitHub)" <gi...@apache.org>.
ekaterinadimitrova2 commented on code in PR #3097:
URL: https://github.com/apache/cassandra/pull/3097#discussion_r1484868404


##########
src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java:
##########
@@ -86,10 +86,13 @@ public void addIndex(SSTableIndex index)
 
             if (logger.isTraceEnabled())
             {
+                if (indexTermType.isVector())
+                    throw new IllegalArgumentException("This is a bug, please, report.");
+                

Review Comment:
   On second thought, this will be changed to: `assert !indexTermType.isVector();` and it should be before` if (logger.isTraceEnabled())`. It should be caught in testing
   



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] C 19168 5.0 [cassandra]

Posted by "ekaterinadimitrova2 (via GitHub)" <gi...@apache.org>.
ekaterinadimitrova2 commented on code in PR #3097:
URL: https://github.com/apache/cassandra/pull/3097#discussion_r1484868404


##########
src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java:
##########
@@ -86,10 +86,13 @@ public void addIndex(SSTableIndex index)
 
             if (logger.isTraceEnabled())
             {
+                if (indexTermType.isVector())
+                    throw new IllegalArgumentException("This is a bug, please, report.");
+                

Review Comment:
   On a second thought this will be changed to: `assert indexTermType.isVector();` It should be caught in testing
   



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] C 19168 5.0 [cassandra]

Posted by "adelapena (via GitHub)" <gi...@apache.org>.
adelapena commented on code in PR #3097:
URL: https://github.com/apache/cassandra/pull/3097#discussion_r1487848601


##########
src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java:
##########
@@ -86,10 +86,13 @@ public void addIndex(SSTableIndex index)
 
             if (logger.isTraceEnabled())
             {
+                if (indexTermType.isVector())
+                    throw new IllegalArgumentException("This is a bug, please, report.");
+                

Review Comment:
   Yep, this should probably be at the beginning of the method. Also, `addIndex` could be inlined inside `add`, which is its only caller.



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] C 19168 5.0 [cassandra]

Posted by "ekaterinadimitrova2 (via GitHub)" <gi...@apache.org>.
ekaterinadimitrova2 commented on code in PR #3097:
URL: https://github.com/apache/cassandra/pull/3097#discussion_r1484868404


##########
src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java:
##########
@@ -86,10 +86,13 @@ public void addIndex(SSTableIndex index)
 
             if (logger.isTraceEnabled())
             {
+                if (indexTermType.isVector())
+                    throw new IllegalArgumentException("This is a bug, please, report.");
+                

Review Comment:
   On a second thought this will be changed to: `assert indexTermType.isVector();`
   



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] C 19168 5.0 [cassandra]

Posted by "ekaterinadimitrova2 (via GitHub)" <gi...@apache.org>.
ekaterinadimitrova2 commented on code in PR #3097:
URL: https://github.com/apache/cassandra/pull/3097#discussion_r1484867252


##########
src/java/org/apache/cassandra/index/sai/memory/VectorMemoryIndex.java:
##########
@@ -29,7 +29,6 @@
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.Function;
 import java.util.stream.Collectors;
-import java.util.stream.IntStream;

Review Comment:
   This was left over from the previous commit



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] C 19168 5.0 [cassandra]

Posted by "ekaterinadimitrova2 (via GitHub)" <gi...@apache.org>.
ekaterinadimitrova2 commented on code in PR #3097:
URL: https://github.com/apache/cassandra/pull/3097#discussion_r1484868404


##########
src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java:
##########
@@ -86,10 +86,13 @@ public void addIndex(SSTableIndex index)
 
             if (logger.isTraceEnabled())
             {
+                if (indexTermType.isVector())
+                    throw new IllegalArgumentException("This is a bug, please, report.");
+                

Review Comment:
   On second thought, this will be changed to: `assert indexTermType.isVector();` and it should be before` if (logger.isTraceEnabled())`. It should be caught in testing
   



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org