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

Bucket Reopening fails to bucket properly when an insertMany contains measurements spanning max span of bucket

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • ALL
    • Hide

       

      > db.createCollection("reopening_bug", {timeseries: {timeField: "t", metaField: "m"}})
      > db.reopening_bug.insertMany([{"t": ISODate("2023-01-01T00:00:00.000Z"), "val": -1, "m": 1}, {"t": ISODate("2024-01-01T00:00:00.000Z"), "val": -1, "m": 1}])
      > db.reopening_bug.insertMany([{"t": ISODate("2023-01-01T00:00:00.000Z"), "val": -1, "m": 1}, {"t": ISODate("2024-01-01T00:00:00.000Z"), "val": -1, "m": 1}])
      

       

      Show
        > db.createCollection( "reopening_bug" , {timeseries: {timeField: "t" , metaField: "m" }}) > db.reopening_bug.insertMany([{ "t" : ISODate( "2023-01-01T00:00:00.000Z" ), "val" : -1, "m" : 1}, { "t" : ISODate( "2024-01-01T00:00:00.000Z" ), "val" : -1, "m" : 1}]) > db.reopening_bug.insertMany([{ "t" : ISODate( "2023-01-01T00:00:00.000Z" ), "val" : -1, "m" : 1}, { "t" : ISODate( "2024-01-01T00:00:00.000Z" ), "val" : -1, "m" : 1}])  
    • Storage Execution 2025-03-31
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      On a time-series collection, inserting a batch of documents to the same metadata that span buckets due to time yields poor bucketing with extra buckets created when there is an eligible bucket for reopening.

            Assignee:
            matt.kneiser@mongodb.com Matt Kneiser
            Reporter:
            matt.kneiser@mongodb.com Matt Kneiser
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: