Description
Owen Leonard
2016-03-11 19:03:45 UTC
Created attachment 49394 [details] [review] Bug 16056: Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This first version will reintroduce the same behavior as before bug 15381: the record will be displayed even if it's no in the DB Test plan: Search for authorities delete one The zebra's index is not updated yet and the results will contain the record you have deleted. Created attachment 49395 [details] [review] Bug 16056: [ALT] Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This second version will change the original behavior: If an authority record is still indexed by zebra but not in the DB, it won't be displayed. Test plan: Search for authorities delete one The results won't contain the record you have deleted. Created attachment 49437 [details] [review] [SIGNED-OFF] Bug 16056: [ALT] Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This second version will change the original behavior: If an authority record is still indexed by zebra but not in the DB, it won't be displayed. Test plan: Search for authorities delete one The results won't contain the record you have deleted. Signed-off-by: Owen Leonard <oleonard@myacpl.org> This patch fixes the error, and does so in a way which I think makes more sense than the other patch. I do no expect to see deleted record in my search results. I think the right behaviour would be that Koha raises an error when trying to delete a record it is not on the DB. Hey, what would happen if we filter non-existent indexed records out, and then someone deletes "another" record in the meantime? The best approach is to make Koha handle this situations elegantly, instead of adding more and more latency to search results rendering. I vote for: render the deleted record, using Zebra's data as usual. Then show an error box if the user tries to delete it. Tomas, this patch fixes a a major regression, I don't think we should have this discussion here :) Let's go with the first patch if you think the second one is not good enough. The first patch eliminates the error but from the point of view of the user it appears as if the deletion never happened. (In reply to Owen Leonard from comment #6) > The first patch eliminates the error but from the point of view of the user > it appears as if the deletion never happened. Yes, that was I have attached the second patch. But it was the behavior before 15381 (and I guess it has already been like that). Removing the in discussion status to get other opinions. Pick the patch you want, but pick one :) Created attachment 49810 [details] [review] Bug 16056: Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This first version will reintroduce the same behavior as before bug 15381: the record will be displayed even if it's no in the DB Test plan: Search for authorities delete one The zebra's index is not updated yet and the results will contain the record you have deleted. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Pushed to Master - Should be in the May 2016 release. Thanks! Not needed in stable versions, status changed to RESOLVED |