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

changeStreams supports watch several dbs

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Querying
    • Labels:
      None

      Description

      Currently, changeStreams supports watching namespace by 3 granularities: single collection, single db, all dbs. If users want to monitor several dbs, we must watch all dbs and then use the filter stage or some outer method to only pass the namespace we want. However, this method is not efficient because there is so much unwanted data pass between mongos, mongod, and even client if we use the outer method to filter.

      In our multi-tenant severless environment, using "watch all dbs" will consume a lot of resources: db1, db2 belongs to user1; db3, db4 belongs to user2. So when we want to migrate user1 to another instance, we must start changeStreams to watch all dbs(db1, db2).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-query-execution Backlog - Query Execution
              Reporter:
              cvinllen@gmail.com vinllen chen
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: