Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/java/org/apache/cassandra/db/filter/DataLimits.java
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ public boolean isUnlimited()

public DataLimits forShortReadRetry(int toFetch)
{
return new CQLLimits(toFetch);
return new CQLGroupByLimits(toFetch, groupPerPartitionLimit, rowLimit, groupBySpec, state);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public UnfilteredPartitionIterator moreContents()
* then future ShortReadRowsProtection.moreContents() calls will fetch the missing ones.
*/
int toQuery = command.limits().count() != DataLimits.NO_LIMIT
? command.limits().count() - mergedResultCounter.rowsCounted()
? Math.max(0, command.limits().count() - mergedResultCounter.counted())
: command.limits().perPartitionCount();

ColumnFamilyStore.metricsFor(command.metadata().id).shortReadProtectionRequests.mark();
Expand Down