[SERVER-85182] Sharded timeseries collections - any queries with readConcern: "available"  hang indefinitely Created: 12/Jan/24  Updated: 07/Feb/24

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: 6.0.12, 7.0.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Shane Smith Assignee: Sergi Mateo Bellido
Resolution: Unresolved Votes: 0
Labels: Sharding, time-series
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File repro.js    
Assigned Teams:
Catalog and Routing
Operating System: ALL
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"});

 

 

Sprint: Repl 2024-02-05, CAR Team 2024-02-19
Participants:
Case:

 Description   

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


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