Bug #6847
closedFix listObjects() to filter by replicaStatus correctly
0%
Description
The replicaStatus parameter to list objects, when set to 'false', should exclude objects that are replicas from another DataONE Member Node from the results list. It doesn't seem to do this. For example, on mn-dev-ucsb-2.test.dataone.org, there are currently 2556 ORE maps.
metacat=# select count(*) from systemmetadata where object_format = 'http://www.openarchives.org/ore/terms'; count ------- 2556 metacat=# select authoritive_member_node, count(authoritive_member_node) as cnt from systemmetadata where object_format like '%ore/terms%' group by authoritive_member_node; authoritive_member_node | cnt -------------------------+------ urn:node:mnDevUCSB2 | 1720 urn:node:mnDevUCSB1 | 574 urn:node:mnDevUNM1 | 247 bogusAuthoritativeNode | 10 urn:node:mnDevUNM2 | 4
Only 1720 of them are native to this node, but when listObjects() is called with replicaStatus set to either 'true' or 'false', both return a count of 2556.
Updated by Chris Jones about 9 years ago
- Status changed from New to In Progress
After a bit of testing, it looks like this bug is limited to calls where multiple parameters are listed like count, formatId, and replicaStatus together. when replicaStatus is used alone, the filtering works. Need to look into the parameter handling and translation to a SQL query.
Updated by Jing Tao about 9 years ago
- Assignee changed from Chris Jones to Jing Tao
Updated by Jing Tao about 9 years ago
Hi Chris:
https://mn-dev-ucsb-2.test.dataone.org/metacat/d1/mn/v2/object?formatId=http://www.openarchives.org/ore/terms&replicaStatus=true&count=3000
The url gets 2930 items.
However:
https://mn-dev-ucsb-2.test.dataone.org/metacat/d1/mn/v2/object?formatId=http://www.openarchives.org/ore/terms&replicaStatus=false&count=3000
this url only gets 1720 items.
So it works. Did I miss anything?