Click or drag to resize
QueryOptionsSetReprepareOnUp Method
Set whether the driver should re-prepare all cached prepared statements on a host when it marks it back up.

This option is enabled by default.

Namespace: Cassandra
Assembly: Cassandra (in Cassandra.dll) Version: 3.7.0
Syntax
C#
public QueryOptions SetReprepareOnUp(
	bool reprepareOnUp
)

Parameters

reprepareOnUp
Type: SystemBoolean

Return Value

Type: QueryOptions
Remarks

The reason why you might want to disable it is to optimize reconnection time when you believe hosts often get marked down because of temporary network issues, rather than the host really crashing. In that case, the host still has prepared statements in its cache when the driver reconnects, so re-preparing is redundant.

On the other hand, if that assumption turns out to be wrong and the host had really restarted, its prepared statement cache is empty, and statements need to be re-prepared on the fly the first time they get executed; this causes a performance penalty (one extra roundtrip to resend the query to prepare, and another to retry the execution).

See Also