Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MONDRIAN-2279] - When a query is cancelled or times out, Mondrian may continue iterating over large tuple lists #639

Merged
merged 2 commits into from
Jan 28, 2016

Conversation

YuryBY
Copy link
Contributor

@YuryBY YuryBY commented Jan 26, 2016

@lucboudreau, @mkambol, would you mind of reviewing/merging?

while (cursor.forward()) {
CancellationChecker.checkCancelOrTimeout(
currentIteration++, Locus.peek().execution);
Copy link
Member

Choose a reason for hiding this comment

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

Can you put Execution in a variable please? It will always be the same execution and will remove a few virtual function calls from each iteration, as this is a tight loop. (please apply this in all other instances)

@YuryBY YuryBY force-pushed the MONDRIAN-2279 branch 2 times, most recently from 50ae471 to 38a5554 Compare January 26, 2016 15:30
@YuryBY
Copy link
Contributor Author

YuryBY commented Jan 26, 2016

@lucboudreau, @mkambol, PR is updated. Thanks.

@@ -1052,6 +1052,18 @@ setting it too high can cause a big delay between the query being marked as canc
<Default>10000</Default>
</PropertyDefinition>
<PropertyDefinition>
<Name>CheckCancelOrTimeoutInterval</Name>
Copy link
Member

Choose a reason for hiding this comment

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

Sorry I just saw this, but we already have another property, CancelPhaseInterval, which does the same. Please standardize on one of the two and make sure to replace all usages of the old property with your new code to handle cancelations as well.

@YuryBY
Copy link
Contributor Author

YuryBY commented Jan 28, 2016

@lucboudreau, @mkambol, PR is ready. Thanks.

@mkambol mkambol self-assigned this Jan 28, 2016
mkambol added a commit that referenced this pull request Jan 28, 2016
[MONDRIAN-2279] - When a query is cancelled or times out, Mondrian may continue iterating over large tuple lists
@mkambol mkambol merged commit 613e6a3 into pentaho:master Jan 28, 2016
@kurtwalker
Copy link
Contributor

@YuryBY @mkambol @lucboudreau This commit broke an Integration test in pentaho-analyzer, DrillBeanIT.testDrillContextDescription. Throws a NPE.
Caused by: java.lang.NullPointerException
at mondrian.util.CancellationChecker.checkCancelOrTimeout(CancellationChecker.java:28)
at mondrian.olap.fun.FilterFunDef$MutableIterCalc.makeIterable(FilterFunDef.java:165)
at mondrian.olap.fun.FilterFunDef$BaseIterCalc.evaluateIterable(FilterFunDef.java:124)

CC @rfellows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants