irods / python-irodsclient

A Python API for iRODS
Other
63 stars 73 forks source link

unregister call ignores NUM_REPL_KW and RESC_NAME_KW, removing all replicas #435

Closed d-w-moore closed 1 year ago

d-w-moore commented 1 year ago

in PRC, if a data object has multiple replicas, on different resources, those replicas cannot be singly selected for removal.

The following application will remove all replicas of the object from the catalog:

import irods.keywords as kw
import irods.test.helpers as h
ses = h.make_session( )
# the following does not remove the replica only from my_resc, but rather removes all replicas in the catalog
ses.data_objects.get( '/logical/path/to/data_object' ).unregister( **{kw.RESC_NAME_KW: 'my_resc' , kw.COPIES_KW: '1' } ) 
trel commented 1 year ago

because of potential data loss, marking as 'bug' rather than 'enhancement'