Delay seen while querying a table with prepare set to true for first time when one node is down

Description

I was running some tests to query data from cassandra cluster and I notice small delay when a node is down to query data. I tested with both version 3.5 and 4.3.1 drivers. The delay is seen only when prepare flag is set to true in query options and when a table with data is queried for the first time. Is this delay expected or is this an issue?

This is how I tested.

  1. Have a cassandra cluster with 3 nodes and each node running in one VM.

  2. Ran a script to create a keyspace (simplestrategy and replication factor of 3) and 10 tables and few records to each table.

  3. Ran a script to query data (prepare=true query option) from each table and everything worked fine without any delay as all nodes are up.

  4. Brought one cassandra node down by shutting down the VM.

  5. Ran the script to query data and I see delay of around 3 seconds when a table is queried for first time. The delay is seen only when prepare=true is set.

Below is the link to my scripts and output of my tests https://drive.google.com/drive/folders/1_JLnyFzGtNE8DtvDhIJ9jEb4lhgCspbC?usp=sharing

Thanks Sarath

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

sarath

Reviewer

None

Fix versions

None

Labels

None

Components

PM Priority

None

Reproduced in

3.5.0
4.3.1

Pull Request

None

Affects versions

Priority

Major
Configure