core/src/Post/PostRepository.php line 106 function getIndexForNumber

Here is the function logic:
where('created_at', '<' as query condition when the page loaded posts from number (posts index).

Here is the issue:
If insert some test posts with same created_at time, the same time posts will not be counted cause the query condition use created_at not number.
So this function will return a wrong count number.

But at the end the query sql, you will see order by number.

As the consistency, should change the where condition to use number replace created_at time?

    zaowan there is no number yet. So you cannot run a query that does number < new-one because that query is meant to retrieve the new number.

    I do think we should look at an improved way to solve this issue as it causes errors on highly volatile communities.