Why do I get WARNING: The polyglot context is using an implementation that does not support runtime compilation?

Hello,

This morning I upgraded a 3-node CrateDB cluster from version 4.6.6 to 4.7.0. The servers are running on Debian GNU/Linux 10.11.

Then I came across the following WARNING lines:

Feb 17 11:13:10 crate-dn-001 crate[134237]: [engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
Feb 17 11:13:10 crate-dn-001 crate[134237]: The guest application code will therefore be executed in interpreted mode only.
Feb 17 11:13:10 crate-dn-001 crate[134237]: Execution only in interpreted mode will strongly impact the guest application performance.
Feb 17 11:13:10 crate-dn-001 crate[134237]: For more information on using GraalVM see https://www.graalvm.org/java/quickstart/.
Feb 17 11:13:10 crate-dn-001 crate[134237]: To disable this warning the '--engine.WarnInterpreterOnly=false' option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system property.
Feb 17 11:13:10 crate-dn-001 crate[134237]: [engine] WARNING: The polyglot context is using an implementation that does not support runtime compilation.
Feb 17 11:13:10 crate-dn-001 crate[134237]: The guest application code will therefore be executed in interpreted mode only.

What is this warning about? Why do I see it now? Any ideas and insights?

Is there anything else that I should check?

Hi @Emre_Sevinc

This seems to be related to an update of GraalVM to version 21.2.0.
GraalVM added a warning if the interpreted mode is used. CrateDB afaik does that on purpose right now.
So it generally the warning is safe to ignore. In the short time we probably will set the mentioned flag. I will get feedback from the team, what prevents us from using the compiled mode.

Thanks for reporting this.


This only seems to be triggered when using UDFs. May I ask what you are currently using it for? :slight_smile:

Hello,

Thanks for the quick reply! Based on the CrateDB documentation at Information schema — CrateDB: Reference I ran the following queries and saw that indeed there are some User Defined Functions (UDFs) in our production cluster:

cr> select count(*), routine_type from information_schema.routines 
    group by routine_type
    order by routine_type;
+----------+--------------+
| count(*) | routine_type |
+----------+--------------+
|       45 | ANALYZER     |
|        3 | CHAR_FILTER  |
|        2 | FUNCTION     |
|       16 | TOKENIZER    |
|       62 | TOKEN_FILTER |
+----------+--------------+

And then focusing on the UDFs:

cr> select routine_name, routine_type, routine_body, data_type, routine_definition 
    from information_schema.routines
    where routine_type = 'FUNCTION' order by routine_name;
+--------------+--------------+--------------+------------------+------------------------------------------------------------------------------------------+
| routine_name | routine_type | routine_body | data_type        | routine_definition                                                                       |
+--------------+--------------+--------------+------------------+------------------------------------------------------------------------------------------+
| lerp         | FUNCTION     | javascript   | double precision | function lerp(x1, y1, x2, y2, x) {                                                       |
|              |              |              |                  |     return y1 + (x.getTime() - x1.getTime()) * (y2 - y1) / (x2.getTime() - x1.getTime()) |
|              |              |              |                  | }                                                                                        |
| lerp         | FUNCTION     | javascript   | double precision | function lerp(x1, y1, x2, y2, x) {                                                       |
|              |              |              |                  |     return y1 + (x - x1) * (y2 - y1) / (x2 - x1)                                         |
|              |              |              |                  | }                                                                                        |
+--------------+--------------+--------------+------------------+------------------------------------------------------------------------------------------+
1 Like