Robert, what do you mean when you say make APIs more tolerant?
AFAICT we have two users of getBuildRecords. I examined their code. William Grant doesn't use the total_size, but Leann Ogasawara does. Leann reports that when the script worked, total_size was in the 2K range. So I doubt the optimization "don't run the count(*) query when the collection size is less than the batch size" will work.
Robert, what do you mean when you say make APIs more tolerant?
AFAICT we have two users of getBuildRecords. I examined their code. William Grant doesn't use the total_size, but Leann Ogasawara does. Leann reports that when the script worked, total_size was in the 2K range. So I doubt the optimization "don't run the count(*) query when the collection size is less than the batch size" will work.