File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1279,6 +1279,12 @@ impl Session {
12791279 /// Returns:
12801280 /// - `Ok(PreparedStatement)`, if preparation succeeded on at least one connection;
12811281 /// - `Err(PrepareError)`, if no connection is working or preparation failed on all attempted connections.
1282+ // TODO: There are no timeouts here. So, just one stuck node freezes the driver here, potentially indefinitely long.
1283+ // Also, what the driver requires to get from the cluster is the prepared statement metadata.
1284+ // It suffices that it gets only one copy of it, just from one success response. Therefore, it's a possible
1285+ // optimisation that the function only waits for one preparation to finish successfully, and then it returns.
1286+ // For it to be done, other preparations must continue in the background, on a separate tokio task.
1287+ // Describing issue: #1332.
12821288 async fn prepare_on_all (
12831289 statement : & Statement ,
12841290 cluster_state : & ClusterState ,
You can’t perform that action at this time.
0 commit comments