BugZero found this defect 128 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/15/2024
MongoDB Server
6.0.12
7.0.5
No fixed releases provided.
Any queries with readConcern: "available" will hang indefinitely on a sharded timeseries collection, while all other readConcern levels execute the same query successfully.
1. Start a sharded cluster on one of the latest MongoDB releases (i.e. 7.0.5, 6.0.12 - older releases also seem to exhibit this behavior from checking a couple others) 2. Enable sharding sh.enableSharding("timeseries"); sh.shardCollection( "timeseries.weather", { "metadata.sensorId": 1 }, { timeseries: { timeField: "timestamp", metaField: "metadata", granularity: "hours" } } ); 3. Insert a few sample docs db.getSiblingDB("timeseries").weather.insertMany([ { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-18T00:00:00.000Z"), "temp": 12 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-18T04:00:00.000Z"), "temp": 11 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-18T08:00:00.000Z"), "temp": 11 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-18T12:00:00.000Z"), "temp": 12 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-18T16:00:00.000Z"), "temp": 16 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-18T20:00:00.000Z"), "temp": 15 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-19T00:00:00.000Z"), "temp": 13 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-19T04:00:00.000Z"), "temp": 12 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-19T08:00:00.000Z"), "temp": 11 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-19T12:00:00.000Z"), "temp": 12 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-19T16:00:00.000Z"), "temp": 17 }, { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2021-05-19T20:00:00.000Z"), "temp": 12 }] ); 4. Attempt to query the sharded timeseries collection in some way specifying readConcern: "available" and the operation will hang indefinitely. Any other readConcern level seems to work fine. db.getSiblingDB("timeseries").weather.find({"metadata.sensorId": 5578}).readConcern("available"); db.getSiblingDB("timeseries").weather.find().readConcern("available"); db.getSiblingDB("timeseries").weather.count({},{readConcern:"available"});