Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57080

MongoDB sort not working properly on Atlas version 4.0.24

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.24
    • Component/s: None
    • Labels:
      None
    • ALL
    • Hide

      Step

      • Query a collection with more than 150 documents with Pagination (page size 50)

      Result

      • Duplicate documents are returned by the driver from second page onwards.
      Show
      Step Query a collection with more than 150 documents with Pagination (page size 50) Result Duplicate documents are returned by the driver from second page onwards.

      When we query MongoDB in environment Atlas version 4.0.24 with SortBy and Pagination,  returning duplicate documents.

      Repository Query:
      Pageable pageable = PageRequest.of(loop,  50, Sort.by("ClassId"));
      List<Document> findByClassIdIn(List<ObjectId> classIds, Pageable pageable);

            Assignee:
            Unassigned Unassigned
            Reporter:
            karthick@helloparent.in Karthick Thiyagarajan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: