Comments (4)
The fix for irods/irods#4157 will take care of this issue.
from irods_rule_engine_plugin_python.
Just to confirm that we experience production issues as we use the python rule engine for gen queries.
Any query that would return a multitude of 256 rows crash the agent process!!
May I request warm attention to this bug pls.
from irods_rule_engine_plugin_python.
Ton,
This is my next bug to fix, I'll be going after it today.
Meanwhile, our 4-2-stable and master development branches of the Python Rule Engine plugin offer a GenQuery iterator which in tests has proven stable even for results of size 256,512,etc. It will be out officially in 4.2.5 of iRODS / Python RE , but I'd welcome you to try it out now if you like.
It's also fairly self-contained, being just a python module that sits in /etc/irods/genquery.py
, so there is every reason to believe it can be ported into any vsn 4.2.0+ iRODS system and work fine.
You can find it at:
https://github.com/d-w-moore/irods_rule_engine_plugin_python/tree/4-2-stable#genquerypy
I'd be glad to answer any questions - if you end up using it - or, of course, any problems you might discover.
Thanks!
- Dan
from irods_rule_engine_plugin_python.
Here are two scripts to help you reproduce the problem.
setup18.r
# create 256 AVUs for /tempZone/home/rods
setupIssue18 {
msiString2KeyValPair("", *kvp);
*kvp.ISSUE18 = "0";
msiSetKeyValuePairsToObj(*kvp, *path, "-C");
for (*i = 1; *i < 256; *i = *i + 1) {
*kvp.ISSUE18 = "*i";
msiAssociateKeyValuePairsToObj(*kvp, *path, "-C");
}
}
input *path="/tempZone/home/rods"
output ruleExecOut
issue18.py
import json
# return list of 256 values
def getAVUs(callback):
avus = []
# setup query
ret_val = callback.msiMakeGenQuery(
"META_COLL_ATTR_VALUE",
"COLL_NAME = '/tempZone/home/rods' AND META_COLL_ATTR_NAME = 'ISSUE18'",
irods_types.GenQueryInp())
query = ret_val["arguments"][2]
# perform query
ret_val = callback.msiExecGenQuery(query, irods_types.GenQueryOut())
while True:
result = ret_val["arguments"][1]
# process results
for row in range(result.rowCnt):
value = result.sqlResult[0].row(row)
avus.append(value)
# Continue with this query.
if result.continueInx == 0:
break
ret_val = callback.msiGetMoreRows(query, result, 0)
callback.msiCloseGenQuery(query, result)
return avus
def issue18(rule_args, callback, rei):
avus = getAVUs(callback)
# Convert to json string and write to stdout.
callback.writeLine("stdout", json.dumps(avus))
from irods_rule_engine_plugin_python.
Related Issues (20)
- Remove deprecated `global_vars` alias
- Add section to README explaining/demonstrating how to pass values back to the caller HOT 1
- Update README for the python interpreter HOT 1
- Possible to use different interpreters? HOT 5
- GeneralUpdate structs generate deprecation warnings during build
- Enable rule engine on Ubuntu 22 and IRODS 4.3.1 HOT 24
- UTF-8 error triggering when pep_database_check_auth_xx or pep_api_auth_response_xx is called HOT 3
- py_remote hostname length HOT 5
- Add dedicated exception type for rules written in PREP
- int output value error upon callback to iRODS rule-language rule with remote block HOT 4
- README table of contents lists Q&A section under Auxiliary Python Modules section
- Investigate using `PyConfig` to amend `sys.path`
- Support a virtual environment HOT 4
- genquery.py: Expose functionality of `_close()` in `Query` class
- Execution of Genquery leads to increased memory allocation HOT 8
- Remove Python 2 compatibility code HOT 2
- Agent with PREP configured as the only REP segfaults when `iput` uses legacy parallel transfer HOT 5
- Test hook does not filter package files
- Improve solution for #218 HOT 3
- Implement support for non-`core.py` Python rulebases HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irods_rule_engine_plugin_python.