You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/05/19 07:56:49 UTC

[GitHub] [cassandra] bereng commented on a change in pull request #559: CASSANDRA-13666 Avoid rendering static 2i entries as stales and removing them

bereng commented on a change in pull request #559:
URL: https://github.com/apache/cassandra/pull/559#discussion_r427101980



##########
File path: src/java/org/apache/cassandra/index/internal/composites/CompositesSearcher.java
##########
@@ -231,16 +231,27 @@ private IndexEntry findEntry(Clustering clustering)
                 while (entriesIdx < entries.size())
                 {
                     IndexEntry entry = entries.get(entriesIdx++);
+                    Clustering indexedEntryClustering = entry.indexedEntryClustering;
                     // The entries are in clustering order. So that the requested entry should be the
                     // next entry, the one at 'entriesIdx'. However, we can have stale entries, entries
                     // that have no corresponding row in the base table typically because of a range
                     // tombstone or partition level deletion. Delete such stale entries.
-                    int cmp = comparator.compare(entry.indexedEntryClustering, clustering);
+                    int cmp = comparator.compare(indexedEntryClustering, clustering);
                     assert cmp <= 0; // this would means entries are not in clustering order, which shouldn't happen
                     if (cmp == 0)
                         return entry;
                     else
-                        staleEntries.add(entry);
+                    {
+                        boolean isStaticClustering = dataIter.metadata().hasStaticColumns();

Review comment:
       @blerer if you give me thumbs up I'll rebase, squash, forward merge and run CI before handing it over to you for committing.




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

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