Skip to content
Merged
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 @@ -237,10 +237,11 @@ private void sizeCheck() {
} else {
rowCountForNextRowCountCheck = min(rowCountForNextRowCountCheck, writer.getRowsWrittenSoFar() + pageRowCountLimit);
}
//estimate remaining row count by previous input for next row count check
long rowsToFillPage =
usedMem == 0 ?
props.getMaxRowCountForPageSizeCheck()
: (long) rows / usedMem * remainingMem;
: rows * remainingMem / usedMem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we worry about overflow by (rows * remainingMem)?

Copy link
Contributor

@gszadovszky gszadovszky Aug 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've felt it as a low risk. We are talking about pages here so neither the row count nor the used memory should be too high that this would overflow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as gszadovszky +1

if (rowsToFillPage < minRecordToWait) {
minRecordToWait = rowsToFillPage;
}
Expand Down