irods / irods_rule_engine_plugin_logical_quotas

BSD 3-Clause "New" or "Revised" License
1 stars 9 forks source link

Cannot remove data object if final replica is stale #111

Closed korydraughn closed 3 weeks ago

korydraughn commented 3 weeks ago

Bug Report

Tested against potential 4.3.2 build of server and plugin.

Saw the following when the REP was enabled.

$ ils -l
/tempZone/home/kory:
  kory              0 demoResc            0 2024-04-01.10:52 X foo
$ irm -f foo
remote addresses: [IP REDACTED] ERROR: rmUtil: rm error for /tempZone/home/kory/foo, status = -1205000 status = -1205000 RE_RUNTIME_ERROR
Level 0: no good replica found: SYS_NO_GOOD_REPLICA

The log contained the following message.

"log_message": "no good replica found: SYS_NO_GOOD_REPLICA",
trel commented 3 weeks ago

And this works fine without logical quotas enabled?

korydraughn commented 3 weeks ago

Yes.

korydraughn commented 3 weeks ago

The issue occurs here because that filesystem function filters out stale replicas. https://github.com/irods/irods_rule_engine_plugin_logical_quotas/blob/b285ba0ac1e5c422621b067ea63b88a5e9d47b3f/src/handler.cpp#L1199

See its implementation for specifics. https://github.com/irods/irods/blob/cd6b746802c6a5eaffb4f40a53cbe70d090c5f72/lib/filesystem/src/filesystem.cpp#L744-L763

The REP is designed to track the data size of data objects with at least one good replica. What should the REP do if there aren't any good replicas? Below are some ideas.

Option (a) seems like the best answer for the following reasons.

Tracking the number of data objects is not affected by this.

trel commented 3 weeks ago

Also, (a) makes sense because logical quotas is already 'ignoring' any object without a good replica.

Agreed, we should have a 'recalculate' rule... to manually correct any 'drift'.

korydraughn commented 3 weeks ago

Related to #94.