The maximum number of item records to process in a batch is 1000. This value is hardcoded in the code. It should be store in a syspref.
Created attachment 23319 [details] [review] Bug 11343: The max number of items to process in a batch is hardcoded Until now, the maximum number of item records to process in a batch was hardcoded to 1000. This patch adds a syspref MaxItemsForBatch in order to allow to adapt this value. Test plan: - set the pref to 2 - try to delete a batch of 3 items: they are not displayed - try to modify a batch of 3 items: you are not allowed to do that - set the pref to 1000 and try again. Now items are displayed and you are allow to modify them.
This patch appears to be missing the creation of koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref.
Arg, thank for the catch!
Created attachment 23456 [details] [review] Bug 11343: The max number of items to process in a batch is hardcoded Until now, the maximum number of item records to process in a batch was hardcoded to 1000. This patch adds a syspref MaxItemsForBatch in order to allow to adapt this value. Test plan: - set the pref to 2 - try to delete a batch of 3 items: they are not displayed - try to modify a batch of 3 items: you are not allowed to do that - set the pref to 1000 and try again. Now items are displayed and you are allow to modify them.
Jonathan, This patch is inconsistent with results. - Set the pref to 2 - try to delete a batch of 3 items This will not show the items, but you can still delete the items. Can anyone confirm if this issue exists with the limit hard coded? I don't have 1001 items to test if going past the hard coded limit would produce the same result. This could be revealing a pre-existing issue. Also, should there be a maximum limit to how much can be processed? It seems to me if you are batch loading 1000 items, and it is displaying all those items, it might cause the entire system to drag. But I am just guessing. And if someone were to set a limit higher than 1000, would that potentially be worse? In theory, it might be a performance issue, but in reality, would there ever be a case where someone would batch process thousands of records and cripple Koha in the process? Christopher
Christopher, The patch is consistent with the test plan: you are allow to modify XXX items and to display XXX items on deletion. It is the same behavior as before the patch. But I agree with you, it is not consistent with the syspref description (the description says: number of items to process). I don't have a quick and small patch to provide. What I know it is that the limit is hardcoded and it is not possible to modify more than 1000 items in a batch, which is a real limitation for some libraries.
I will go ahead and sign off on this then and file a new bug regarding the processing issue. Christopher
Patch tested with a sandbox, by Christopher Brannon <cbrannon@cdalibrary.org>
Created attachment 23999 [details] [review] Bug 11343: The max number of items to process in a batch is hardcoded Until now, the maximum number of item records to process in a batch was hardcoded to 1000. This patch adds a syspref MaxItemsForBatch in order to allow to adapt this value. Test plan: - set the pref to 2 - try to delete a batch of 3 items: they are not displayed - try to modify a batch of 3 items: you are not allowed to do that - set the pref to 1000 and try again. Now items are displayed and you are allow to modify them. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Created attachment 24133 [details] [review] Bug 11343: The max number of items to process in a batch is hardcoded Until now, the maximum number of item records to process in a batch was hardcoded to 1000. This patch adds a syspref MaxItemsForBatch in order to allow to adapt this value. Test plan: - set the pref to 2 - try to delete a batch of 3 items: they are not displayed - try to modify a batch of 3 items: you are not allowed to do that - set the pref to 1000 and try again. Now items are displayed and you are allow to modify them. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master. Thanks, Jonathan!
Pushed to 3.14.x, will be in 3.14.07