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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.0.21
    • Component/s: None
    • 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
    • None
    • None
    • None
    • None
    • None
    • None
    • None

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

            Assignee:
            Randolph Tan
            Reporter:
            Chan Lewis
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: