8388810: Exceeding CachedRowSet max rows should only warn once - #32033
8388810: Exceeding CachedRowSet max rows should only warn once#32033justin-curtis-lu wants to merge 2 commits into
Conversation
| insertRow = null; | ||
|
|
||
| // set the warnings | ||
| sqlwarn = new SQLWarning(); |
There was a problem hiding this comment.
sqlwarn does not get a addRowSetWarning style method because it is unused by the implementation.
|
👋 Welcome back jlu! A progress list of the required criteria for merging this PR into |
|
@justin-curtis-lu This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 50 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
| rowsetWarning.setNextException(new SQLException("Populating rows " | ||
| + "setting has exceeded max row setting")); | ||
| if (rowsFetched >= mRows && mRows > 0) { | ||
| addRowSetWarning(MAX_ROW_WARNING); |
There was a problem hiding this comment.
exceededMax is not required for the 2-arg populate because the existing code already breaks out of processing altogether when the max is encountered.
|
@justin-curtis-lu The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
There was a problem hiding this comment.
Added these warning tests as a standalone test file, since test/jdk/javax/sql/test/rowset/cachedrowset/CachedRowSetTests.java is better reserved for the common test suite.
| */ | ||
| private void addRowSetWarning(String reason) { | ||
| if (rowsetWarning == null) { | ||
| rowsetWarning = new RowSetWarning(reason); |
There was a problem hiding this comment.
Although I consider it a bug that the root warning was always empty in the original code, I can revert this change to the original behavior if we think there is risk.
| */ | ||
| private void addRowSetWarning(String reason) { | ||
| if (rowsetWarning == null) { | ||
| rowsetWarning = new RowSetWarning(reason); |
|
/integrate |
|
Going to push as commit 79d629a.
Your commit was automatically rebased without conflicts. |
|
@justin-curtis-lu Pushed as commit 79d629a. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Ensure that the implementation does not generate subsequent warnings for each row exceeded above the maximum allowed.
Additional fixes included
crscreated via hashtable c-tor no longer throwsNPEwhen its warning is referenced.populateusessetWarningwith aRowSetWarningwhich fixes the issue when the warning was polled by client and anErroroccurred, becausesetExceptiondoes not expect anSQLExceptionProgress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32033/head:pull/32033$ git checkout pull/32033Update a local copy of the PR:
$ git checkout pull/32033$ git pull https://git.openjdk.org/jdk.git pull/32033/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32033View PR using the GUI difftool:
$ git pr show -t 32033Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32033.diff
Using Webrev
Link to Webrev Comment