This patch adds ability to specify a global config to js-evaluator / JS-UDFs.
We're currently accepting log_level (changes the logging level of JS-UDFs) and conn_pool_size (limits the number of open query iterators at a given point during UDF execution). Schema is as follows:
{
|
"log_level": integer between 1-6
|
"conn_pool_capacity" : integer between 1-20
|
}
|
config can be accessed via the following endpoints (for JS-UDFs only Global External Functions Manage role is allowed):
curl -v -s -k -X POST http://127.0.0.1:8096/evaluator/config -u Administrator:asdasd -H 'content-type: application/json' --data-binary @config.json
|
curl -s -k -X GET http://127.0.0.1:8096/evaluator/config -u Administrator:asdasd
|
—
With this change users can now update the log level dynamically between Fatal (1) and Trace (6).
And can change the connection pool size anytime during execution between 1-20 handles.
Config is replicated over metakv across all query nodes.
Build couchbase-server-7.1.0-2259 contains query commit 2a1fdd4 with commit message:
MB-50464: Jsonschema parsing dependency for js-evaluator