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

Cannot read from another mongos with secondaryPreferred after creating a new collection on one mongos

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.21
    • Component/s: None
    • Labels:
      None
    • Sharding 2021-01-25, Sharding 2021-02-22, Sharding 2021-03-08, Sharding 2021-03-22, Sharding 2021-04-05, Sharding 2021-04-19, Sharding 2021-05-03

      Hi. For some reason we're using Mongo 4.0, and found the following issue.

      After I created a sharded collection with hashed sharding and inserted some data on mongos A,  I cannot read some of data with readPreference=secondary or secondaryPreferred from another mongos B.

       

      I tried mongo shell, python driver, mgo driver, and they all had the same issue.

      Finally I tried mongo 4.4 on local host, the issue was gone.

       

      I tried to find the  issue on Jira, but NOT FOUND. So is there an issue about this ? And I really want to know why that happens.

       

      Thanks.

        1. 1-create-t1-from-A.js
          0.2 kB
          _baiwfg2@gmail.com
        2. 2-read-t1-from-B.js
          0.2 kB
          _baiwfg2@gmail.com
        3. 3-create-t2-from-A.js
          0.2 kB
          _baiwfg2@gmail.com
        4. 4-read-t2-from-B.js
          0.2 kB
          _baiwfg2@gmail.com
        5. diagnostic.data-on-4.4.2.tar.bz2
          226 kB
          _baiwfg2@gmail.com
        6. image-2020-12-30-21-22-38-181.png
          158 kB
          _baiwfg2@gmail.com
        7. image-2021-01-05-11-08-14-899.png
          148 kB
          _baiwfg2@gmail.com
        8. image-2021-01-26-10-59-01-238.png
          58 kB
          _baiwfg2@gmail.com
        9. image-2021-01-26-10-59-27-147.png
          19 kB
          _baiwfg2@gmail.com
        10. image-2021-01-26-11-18-04-528.png
          38 kB
          _baiwfg2@gmail.com
        11. mdb 4.0.21.png
          250 kB
          Edwin Zhou
        12. mdb 4.4.2.png
          247 kB
          Edwin Zhou
        13. read.js
          0.2 kB
          Edwin Zhou
        14. read col1.png
          178 kB
          Edwin Zhou
        15. repro.js
          0.3 kB
          Edwin Zhou
        16. repro.tar.gz
          1.68 MB
          Edwin Zhou
        17. Screen Shot 2021-01-06 at 1.26.47 PM.png
          139 kB
          Edwin Zhou
        18. skip reading col1.png
          173 kB
          Edwin Zhou
        19. user mdb 4.4.2.png
          248 kB
          Edwin Zhou

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            baiwfg2@gmail.com Chan Lewis
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: