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

`modify` change events don’t reflect effective cappedSize

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 6.0.14
    • Component/s: None
    • None
    • Storage Execution
    • ALL

      If you run:

      {{collMod: "mycoll", cappedSize: 100000}}
      

      … while a DDL-aware change stream is running …

      > cs = db.getSiblingDB('admin').aggregate([{$changeStream: { showExpandedEvents: true, allChangesForCluster: true }}])
      
      > cs.next()
      

      … you’ll see a change event with:

      options: { capped: true, size: 100000 }
      

      … even though the collection’s actual new limit, due to some rounding that seems to happen, is 100,096 documents.

      The change stream should indicate size: 100096 since that’s the actual change that occurred on the server.

      cc matt.kneiser@mongodb.com, from a Slack thread

      We do not see this in v7+.

            Assignee:
            Unassigned Unassigned
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: