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

MongoDB sort not working properly on Atlas version 4.0.24

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 4.0.24
    • None
    • 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.

    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

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

            Dates

              Created:
              Updated:
              Resolved: