Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class LargeReadRowsResumptionStrategy<RowT>
Logger.getLogger(LargeReadRowsResumptionStrategy.class.getName());
private final RowAdapter<RowT> rowAdapter;
private ByteString lastSuccessKey = ByteString.EMPTY;
// Number of rows processed excluding Marker row.
// Number of rows processed (including skipped large rows, excluding marker rows).
private long numProcessed;
private ByteString largeRowKey = ByteString.EMPTY;
// we modify the original request in the resumption strategy regardless of how many times it has
Expand Down Expand Up @@ -93,6 +93,8 @@ public Throwable processError(Throwable throwable) {
if (rowKeyExtracted != null) {
LOGGER.warning("skipping large row " + rowKeyExtracted);
this.largeRowKey = rowKeyExtracted;
// Skipped large rows would have been returned if not for system size limits, so they
// intentionally count towards the query's row limit.
numProcessed = numProcessed + 1;
}
return throwable;
Expand All @@ -116,7 +118,7 @@ private ByteString extractLargeRowKey(Throwable t) {
* <p>This returns an updated request excluding all the rows keys & ranges till (including) {@link
* #lastSuccessKey} & also excludes the last encountered large row key ({@link #largeRowKey}).
* Also, this implementation takes care to update the row limit of the request to account for all
* of the received rows.
* of the received rows and skipped large rows.
*/
@Override
public ReadRowsRequest getResumeRequest(ReadRowsRequest originalRequest) {
Expand Down
Loading