Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

UDF aggregate execution error #56

Open
ramunasd opened this issue Apr 30, 2020 · 4 comments
Open

UDF aggregate execution error #56

ramunasd opened this issue Apr 30, 2020 · 4 comments

Comments

@ramunasd
Copy link
Contributor

We are getting error UDF: Execution Error 1 when UDF function is executed using method Aerospike->aggregate(). Lua functions on itself are correct and works perfectly when triggered using tool aql.

Here is how we enable log output:

$client->setLogHandler(function(){print_r(func_get_args());});
$client->setLogLevel(Aerospike::LOG_LEVEL_TRACE);
$client->aggregate(...);
var_dump($client->error(), $client->errorno());

And output:

Array
(
    [0] => 4
    [1] => apply_stream
    [2] => src/main/mod_lua.c
    [3] => 1232
)
Array
(
    [0] => 4
    [1] => apply_stream
    [2] => src/main/mod_lua.c
    [3] => 1235
)
Array
(
    [0] => 4
    [1] => poll_state
    [2] => src/main/mod_lua.c
    [3] => 620
)
Array
(
    [0] => 0
    [1] => create_state
    [2] => src/main/mod_lua.c
    [3] => 577

Array
(
    [0] => 4
    [1] => poll_state
    [2] => src/main/mod_lua.c
    [3] => 629
)
Array
(
    [0] => 4
    [1] => apply_stream
    [2] => src/main/mod_lua.c
    [3] => 1239
)
string(22) "UDF: Execution Error 1"
int(100)
@ramunasd
Copy link
Contributor Author

It would be very nice to get original error message. Currently only technical info(not very usefull) is provided here:
https://github.com/aerospike/aerospike-client-php/blob/652bd9cb9776a39f07b403e79fecdf3abf8420a0/src/client/log_handlers.c#L82

@dwelch-spike
Copy link
Contributor

Hi @ramunasd,

This could be a udf registration issue. Stream udfs require that the udf is registered with both the server and the client. Please see this similar issue and the php client example.

https://discuss.aerospike.com/t/another-udf-error-100-debugging/3778
https://github.com/aerospike/aerospike-client-php/blob/master/examples/query_examples/aggregate.php

@ramunasd
Copy link
Contributor Author

ramunasd commented May 5, 2020

@dwelch-spike thanks for answer. Actually we tried to register functions right before aggregation but still no luck.
Everythong works great from CLI even without single time register, while FPM fails almost every time.

@ramunasd
Copy link
Contributor Author

@dwelch-spike would it possible to submit original error message to php error handler function as last parameter? This would not be a breaking change since all other params stays in same order.

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

No branches or pull requests

2 participants