Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
7.1.2
-
7.1.2-3420
-
Untriaged
-
1
-
Yes
Description
simple repro
install travel-sample
CREATE OR REPLACE FUNCTION func4()
{ (SELECT RAW t1.geo.alt FROM `travel-sample`) }SELECT array_length(func4()) FROM `travel-sample`
^ the above query now takes much longer than before due to the fix for MB-53372, it now hits the 10 min timeout, in 7.1.2-3419 it took about 9 seconds
Attachments
Issue Links
- mentioned in
-
Page Loading...
The issue here is that the UDF runner tries to determine if the subquery results should be cached based on whether the UDF takes parameters and the subquery is correlated.
In this case the answer is no in both cases, so the query result can be cached at the request level, but the fix to
MB-53372is partial and only checks if the parameter list is nil, and not if it has zero length.The net result is that a corner case, where the UDF scans lots of documents (people shouldn't really be doing this, but still), and it is executed over lots of documents (people shouldn't be doing this, but still), now will take lots of time.
The fix is to extend the test of the parameter list.
To summarize - change in behaviour from 7.1.1, shouldn't happen a lot, when it happens it will be very annoying, easy fix.