[SERVER-80180] Time Series Collection Created: 17/Aug/23  Updated: 27/Oct/23  Resolved: 27/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: zhijia zhang Assignee: Backlog - Triage Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-08-17-14-53-46-724.png     HTML File weather27h1    
Issue Links:
Duplicate
duplicates SERVER-80268 MongoDB TimeSeries Collection TTL Pro... Closed
Assigned Teams:
Server Triage
Operating System: ALL
Steps To Reproduce:

db.createCollection(
    "weather27h1",
    {
       timeseries:

{           timeField: "timestamp",           metaField: "metadata",           granularity: "hours"        }

,
       expireAfterSeconds: 86400
    }
)
 
db.weather27h1.insertMany( [
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-10T00:00:00.000Z"),
      "temp": 12
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-10T04:00:00.000Z"),
      "temp": 11
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-10T08:00:00.000Z"),
      "temp": 11
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-10T12:00:00.000Z"),
      "temp": 12
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-10T16:00:00.000Z"),
      "temp": 16
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-17T20:00:00.000Z"),
      "temp": 15
   },

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-19T00:00:00.000Z"),
      "temp": 13
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-19T04:00:00.000Z"),
      "temp": 12
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-19T08:00:00.000Z"),
      "temp": 11
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-19T12:00:00.000Z"),
      "temp": 12
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-19T16:00:00.000Z"),
      "temp": 17
   },
   

{       "metadata": \{ "sensorId": 5578, "type": "temperature" }

,
      "timestamp": ISODate("2023-08-19T20:00:00.000Z"),
      "temp": 12
   }
] )
 
 

Participants:

 Description   

Hi all,

   I met a strange about the time series collection . MongoDB version 5.0.18 and i create a time series collection with Expire property but when the time is come we see that document did not removed. Current date is ISODate("2023-08-17T06:53:03.288Z"), but you can see in the pic the data with timestamp ISODate("2023-08-10T00:00:00Z") was not removed and still exists. Who can tell me why 

 

   



 Comments   
Comment by Edwin Zhou [ 27/Oct/23 ]

Hi aaa15942975658@163.com,

This ticket appears to duplicate another one of your submissions, SERVER-80268. I advise that you continue your investigation there.

Kind regards,
Edwin

Generated at Thu Feb 08 06:42:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.