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

MongoDB sort not working properly on Atlas version 4.0.24

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 4.0.24
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      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.

      Description

      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);

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: