Missing change-sets when using ScmQueryService findChangeSets method
Hi, I am trying to get all the change-sets using ScmQueryService findChangeSets method, but some change-sets are missing from result. I am using default criteria IChangeSetSearchCriteria.FACTORY.newInstance(). It turns out that change-sets having same timestamps which do not fit in IScmQueryService.MAX_PAGE_SIZE are missing because I am using changeSet.getLastChangeDate().getTime() to get next page.
Example: Suppose there are 513 change-sets CS1 to CS513. CS512 and CS513 are having same last change date. In this case if we get the change-sets using findChangeSets CS513 will be missing.
To resolve this we are keeping all the change-sets having same timestamp in same page but it is slow and also has a drawback that when change-sets count having same LastChangeDate is more than IScmQueryService.MAX_PAGE_SIZE we can not get all the change-sets.
How can we get all the change-sets in such case efficiently?