Limitation of 500 metadata items in PRC

28 views
Skip to first unread message

Andre Parent

unread,
Feb 22, 2024, 10:14:51 AM2/22/24
to iRODS-Chat
Hello,

Using PRC 1.1.9 and iRODS 4.2.12, I saw that there is a limitation of 500 items in an object.metadata.items() list when the object has in fact more than 500 metadata items. This apply to both collection and data objects. I've checked the release notes of PRC 2.0.0 and didn't see anything on this subject.

>>> coll_obj = irods_session.collections.create('/tempZone/home/me/test_meta_iter')
>>> for number in range(600):
...     key = 'test' + str(number)
...     coll_obj.metadata.add(key, str(number))
...
>>> len(coll_obj.metadata.items())
500
>>>

$ iquest "SELECT COUNT(META_COLL_ATTR_NAME) WHERE COLL_NAME = '/tempZone/home/me/test_meta_iter'"
META_COLL_ATTR_NAME = 600


Is there a way to go around this limitation or is it possible to remove it?

Thanks
Andre

Terrell Russell

unread,
Feb 22, 2024, 10:43:48 AM2/22/24
to irod...@googlegroups.com
That 500 looks to be an original default limit...


Manually, you can call the Query.limit() method to set that to a different value - but you're getting the default behavior from coll_obj.metadata.
I'm sure there's a smart person who knows how to make this do what you want...

Anyone?

Terrell



 

--
--
The Integrated Rule-Oriented Data System (iRODS) - https://irods.org
 
iROD-Chat: http://groups.google.com/group/iROD-Chat
---
You received this message because you are subscribed to the Google Groups "iRODS-Chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/irod-chat/d01d5807-626b-4b51-8ff0-080b18cded4en%40googlegroups.com.

Andre Parent

unread,
Feb 22, 2024, 3:10:02 PM2/22/24
to iRODS-Chat
Hi Terrell, 

I didn't think of using a gen query. I tough it was related to something else since when I call coll_obj.data_objects it's not limited to 500.

I did some tests with a gen query and the strange thing is that without setting a limit I'm not limited to 500 .

I'll use a gen query instead  as a work around.

Thank you very much.
Andre
Reply all
Reply to author
Forward
0 new messages