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

dbhash caching strategy evaluation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 2.7.6
    • Fix Version/s: Backlog
    • Component/s: Sharding
    • Labels:

      Description

      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
      }
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: