Details
-
Task
-
Resolution: Fixed
-
Critical
-
6.5.0
-
6.5.0-3790
Description
add this javascript function:
[root@localhost logs]# curl -X POST http://localhost:43381/api/v1/functions -H 'content-type: application/json' -d '{"name":"math","code":"function add(a, b)
add this javascript function
[root@localhost ~]# curl -X POST http://localhost:43381/api/v1/functions -H 'content-type: application/json' -d '{"name":"math","code":"function mult(a, b) { let data = a * b; return data; }"}'
curl the endpoint to see if they are there:
[root@localhost ~]# curl http://localhost:43381/api/v1/functions -H 'content-type: application/json'
{"name":"math","id":"85:70:cc:46:27:c9:e5:d","code":"function add(a, b) { let data = a + b return data }
"}
Second javascript function was never added. This seems to be an intermittent error, both Evgeny and I have seen it.
If i try to create a function based on the second method and use it i get an error:
CREATE FUNCTION javaScriptmult() LANGUAGE JAVASCRIPT AS
select javaScriptmult(6,1)
this query hangs or throws an error (i've seen both behaviors)
When i try to cancel it i see this in the logs:
Client-side error-report for user "Administrator" on node 'ns_1@cb.local':
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Error cancelling query: {"data":"Unexpected server error","status":500,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"../_p/query/query/service","headers":
,"data":
{"statement":"delete from system:active_requests where clientContextID = \"d4fa5d87-ea7b-4b07-ad5d-32577572a76a\";","pretty":false,"timeout":"600s","client_context_id":"INTERNAL-63f1d0ca-d186-4ac2-90e4-c5406b74bab4"},"timeout":{"$$state":{"status":0,"pending":[[{"$$state":{"status":0}},null,null,null]]}}},"statusText":"Internal Server Error","xhrStatus":"complete"}