-
Notifications
You must be signed in to change notification settings - Fork 199
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
What is the proper way to pass array as a parameter to UDF? #275
Comments
What do you mean by Memory leak? Does the memory utilization of your process (resident memory) increase over time? Memory utilization is different from memory leak. For filtering records on the server side, you could potentially use |
By memory leak i meant explosive memory allocation which exceeded 1gb per go-routine constraint. Predicates are not the case since i can not filter records which has bins with value included in my set, only exact value or number range. There were only 3 records in my dev environment so there could not be many data there. |
I don't know how much data you may have, but all that data is serialized for a lua engine to process for the final reduction. That lua engine MAY also not free that data fast enough. |
Did you make any progress? |
https://github.com/qw4n7y/golang-aerospike-client-issue-reproduction. Please have a look at code which reproduces my issue |
Good news! This issue was related to #272, which is fixed in the latest release (v2.7.0) |
Good day! I have confusions about the right way to pass array to UDF. I've not found any info about that in docs.
Goal: pass array of integers to filter records. So i've wrote UDF with filter / map pipeline and made calls with
QueryAggregate
My first approach: pass slice wrapped with
aerospike.NewValueArray
/aerospike.NewListValue
. That worked and in UDF i've got this argument seeing asuserdata
. But! after that memory leak had always occur:After all i've come with solution to pass array as a string (what a shame on me) and use
loadstring("return "..str)()
to parse the string into lua'stable
object.What is the proper way for doing that? Thanks in advance
The text was updated successfully, but these errors were encountered: