Issue 17844

NameUsageService.listRelated() should be pageable

17844
Reporter: mdoering
Assignee: mdoering
Type: Improvement
Summary: NameUsageService.listRelated() should be pageable
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2015-09-25 12:55:03.94
Updated: 2015-10-06 18:05:39.055
Resolved: 2015-10-06 18:05:38.723
        
Description: The API method to list related usages for a given backbone key currently returns a list of all usages. For some queries this returns over 41000 records with heavy use of joins. That takes several seconds and we should better be using paging here too.

Consider how to deal with this as it is an API breaking change.

See POR-2856 ]]>
    


Author: mdoering@gbif.org
Comment: [~trobertson@gbif.org] it would be good to get that fixed to not run into species pages timeouts again (or api calls), but it is a breaking API change. Does an "emergency" situation warrant such a fix? Deprecating the old method with a new method and throw some errors in the old one does not seem much nicer for existing clients.
Created: 2015-09-25 13:29:50.992
Updated: 2015-09-25 13:29:50.992


Author: mdoering@gbif.org
Comment: Alternatively we could set a hard limit, e.g 100, and simply not allow access to more related usages
Created: 2015-09-25 13:37:26.101
Updated: 2015-09-25 13:37:26.101


Author: trobertson@gbif.org
Comment: Yes, I agree we should fix it and announce on the api-users list (CC'ing Scott and asking if he will adapt too)
Created: 2015-09-25 15:05:13.845
Updated: 2015-09-25 15:05:13.845


Author: mdoering@gbif.org
Comment: written to api mailing list
Created: 2015-09-29 11:31:44.907
Updated: 2015-09-29 11:31:44.907


Author: mdoering@gbif.org
Comment: Review: http://dev.gbif.org/code/cru/CR-GBIFCOM-96
Created: 2015-09-30 13:16:11.786
Updated: 2015-09-30 13:16:11.786


Author: mdoering@gbif.org
Comment: API commit: https://github.com/gbif/gbif-api/commit/d7c29549c9c67cedf99d927b65052f2ea403ee0b
Created: 2015-10-06 16:25:35.605
Updated: 2015-10-06 16:25:35.605


Author: mdoering@gbif.org
Comment: CLB Impl: https://github.com/gbif/checklistbank/commit/dc66adaffcd9e6fd574f0f545ea33a31f7f45b68
Created: 2015-10-06 17:50:15.754
Updated: 2015-10-06 17:50:15.754


Author: mdoering@gbif.org
Comment: Added to Portal: https://github.com/gbif/portal-web/commit/b62e54f3a76df0af8d0b855d6f8312050b85e7f3
Created: 2015-10-06 18:05:28.277
Updated: 2015-10-06 18:05:28.277