{"record":{"id":"1d58d3f5bcae98cf","repo":"qdrant/qdrant","slug":"errors-count-of-operations-count-read-operatio","errorCode":null,"errorMessage":"{errors_count} of {operations_count} read operations failed{errors_separator}","messagePattern":"(.+?) of (.+?) read operations failed(.+?)","errorType":"http","errorClass":"CollectionError","httpStatus":500,"severity":"error","filePath":"lib/collection/src/shards/replica_set/execute_read_operation.rs","lineNumber":404,"sourceCode":"            }\n        }\n\n        if responses.len() >= required_successful_results {\n            Ok(responses)\n        } else {\n            let errors_count = errors.len();\n            let operations_count = responses.len() + errors.len();\n            let errors_separator = if !errors.is_empty() { \":\" } else { \"\" };\n\n            let mut message = format!(\n                \"{errors_count} of {operations_count} read operations failed{errors_separator}\"\n            );\n\n            for error in errors {\n                write!(&mut message, \"\\n  {error}\").expect(\"writing into String always succeeds\");\n            }\n\n            Err(CollectionError::service_error(message))\n        }\n    }\n}\n","sourceCodeStart":386,"sourceCodeEnd":408,"githubUrl":"https://github.com/qdrant/qdrant/blob/74f3e85b9473c62560006c043e13737ce6b48412/lib/collection/src/shards/replica_set/execute_read_operation.rs#L386-L408","documentation":"Read operations fan out to the shard's replica set; when every queried replica returns an error (network, timeout, replica down), qdrant aggregates them into a service error 'N of M read operations failed' listing each replica failure. It means zero healthy replicas served that shard's read — with even one healthy replica, the read succeeds.","triggerScenarios":"A point read (get/scroll by id) against a shard whose replicas are all stopped, unreachable, or timing out; a transient cluster-wide network partition during the read.","commonSituations":"Rolling restarts that stop all replicas of a shard simultaneously; misconfigured cluster addresses; replicas overloaded past request deadlines.","solutions":["Check /cluster and telemetry: bring at least one replica per shard group back to Active state","Revive a dead/out-of-sync replica or restore the shard from a snapshot/healthy replica","Retry with backoff for transient partitions","During maintenance, never stop all replicas of the same shard at once"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"let mut attempt = 0;\nloop {\n    match collection.retrieve(points).await {\n        Err(e) if e.to_string().contains(\"read operations failed\") && attempt < 3 => {\n            attempt += 1;\n            tokio::time::sleep(Duration::from_millis(200 * attempt)).await;\n        }\n        other => break other,\n    }\n}","preventionTips":["Keep at least one replica per shard group running during maintenance windows","Monitor /cluster for replica states and alert before all replicas of a shard go down","Set client-side retries with backoff for read operations in distributed deployments"],"tags":["rust","qdrant","replication","read","distributed","availability"],"backgroundTag":null,"analyzedSha":"74f3e85b9473c62560006c043e13737ce6b48412","analyzedAt":"2026-08-22T20:16:20.450Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}