irods / irods

Open Source Data Management Software
https://irods.org
BSD 3-Clause "New" or "Revised" License
444 stars 141 forks source link

possible to have remove_all in atomic metadata operation? #7871

Open mstfdkmn opened 3 months ago

mstfdkmn commented 3 months ago

Feature

Would be possible to have "remove all available metadata on an object without knowing attributes and values" in one shot?

korydraughn commented 3 months ago

Yes, it's possible. We'd have to make a decision about how to expose the functionality. There are three ways to do that.

Modifying the atomic metadata API seems to be the most sensible approach, so we can start there.

mstfdkmn commented 3 months ago

Thanks. One of the motivations in requesting this is that the atomic metadata api has currently only two options for the operation (add and remove), it doesn't contain set. So, in case a need to overwrite an existing metadata pair, we need to beforehand know attributes and values. And the other reason will be that with any client which can call the atomic end point we can clear all existing metadata and add new metadata in one call easily.

korydraughn commented 3 months ago

That's correct. The exclusion of set is intended because it could be implemented in terms of add and remove.

We'll look into getting this implemented in an efficient manner.