Closed qifeng-bai closed 1 year ago
After discussed with Peggy, those two bad records should be deleted
PR: #274 Fix deletion
Test:
Go to : https://lists-test.ala.org.au/admin/speciesLists?q=&max=25&sort=itemsCount&order=desc Delete "ALA_alc"
@peggynewman Can you please test the deletion function for me?
Test passed. Ala_alc was successfully deleted.
https://lists-test.ala.org.au/speciesListItem/list/dr7485
This list put a large number of Latitudes and Longitudes as a KV pair into KVP table,
When we fired a GroupBy query on its KVP and generated >62000 records. The query took > 18 seconds on MySQL
Issues on "Delete" method 1, The transactional, delete(flush) cannot work with the list which contains a large number of KVP records. "Delete this list" will hanging around till time out. https://github.com/AtlasOfLivingAustralia/specieslist-webapp/blob/develop/grails-app/controllers/au/org/ala/specieslist/SpeciesListController.groovy#L87
2, Inconsistent actions on delete" methods: The delete method on server will redirect to 'list' page after deletion: https://github.com/AtlasOfLivingAustralia/specieslist-webapp/blob/develop/grails-app/controllers/au/org/ala/specieslist/SpeciesListController.groovy#L87
However, the frontend , the JS tries to reload current page, which is , for example: which https://lists-test.ala.org.au/speciesListItem/list/dr7485. Since dr7585 has been deleted, it will return a warning that the list cannot be found.
https://github.com/AtlasOfLivingAustralia/specieslist-webapp/blob/develop/grails-app/views/speciesListItem/list.gsp#L228