You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
statement/transport: re-add per-statement setters for retry policy
The set_retry_policy and get_retry_policy methods of Query,
PreparedStatement and Batch were removed #592, but are re-added here due
to user request and because they will be useful for cpp-rust-driver.
One important difference with the old {set,get}_retry_policy is that the
new methods take and Arc<dyn RetryPolicy> instead of Box<dyn
RetryPolicy>. This was done in order not to introduce additional
allocations when a query/statement/batch is cloned.
The retry_policy field was added directly to
Batch/Query/PreparedStatement instead of StatementConfig. Unfortunately,
StatementConfig is public along with all of its fields, so adding more
fields to it will be a breaking change. This should be fixed
during/after #701.
Tested manually by setting a custom retry policy that prints a message
when it is used.
Fixes: #692
0 commit comments