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

dbhash caching strategy evaluation

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.7.6
    • Component/s: Sharding
    • Sharding

      My understanding is that SERVER-11021 caches dbHash results for config collections, and this helps performance of config servers. There's though nothing that prevents a user to create a db called config and use that as an ordinary database (rather than a config database) and on which subsequent calls of dbhash will return the cached value.
      Can't all the dbs cache dbhash results or, if the current behaviour is preserved, can some form of validation be introduced so that only config databases on config servers cache results for dbhash?

      > db.runCommand("dbhash")
      {
              "numCollections" : 5,
              "host" : "ip-172-31-41-197",
              "collections" : {
                      "counttable" : "8d5cc27b1d7dd9bc63592d51e5adf0b7",
                      "linktable" : "0cd663975a970d8e311f4a198c83df54",
                      "nodetable" : "a024eba2346cf537f6563d317101dcda"
              },
              "md5" : "ef17873e9594b8deaf738f4a90614ff4",
              "timeMillis" : 0,
              "fromCache" : [
                      "config.counttable",
                      "config.linktable",
                      "config.nodetable"
              ],
              "ok" : 1
      }
      

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            davide.italiano Davide Italiano
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: