Skip to content

Commit b209464

Browse files
committed
session: describe "no timeouts upon prepare" issue
1 parent f901152 commit b209464

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scylla/src/client/session.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)