Operational Defect Database

BugZero found this defect 128 days ago.

MongoDB | 2544679

Sharded timeseries collections - any queries with readConcern: "available"  hang indefinitely

Last update date:

3/15/2024

Affected products:

MongoDB Server

Affected releases:

6.0.12

7.0.5

Fixed releases:

No fixed releases provided.

Description:

Info

Any queries with readConcern: "available" will hang indefinitely on a sharded timeseries collection, while all other readConcern levels execute the same query successfully.

Top User Comments


Steps to Reproduce

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"});

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

In Progress

Learn More

Search:

...