GitHub user sebbASF opened an issue:

    https://github.com/apache/incubator-ponymail/issues/315

    Bug: elastic.scroll does not return nil sid when there are no more results

    The code in pminfo.lua assumes that elastic.scroll will return a nil sid 
when there are no more results.
    That is not the case - the sid will just remain the same.
    When there are no more results the hits array will be empty.
    
    The only reason the code does not loop forever is that there is a max loop 
count of 5.
    As well as being inefficient, it's possible that some results may be missed.
    
    The code in stats.lua also assumes sid will eventually be nil.
    However it also checks the hits array, so the sid check is merely redundant.

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to