Race condition: re-prepare on UP might not use the current keyspace

Description

Re-preparing on UP might fail in the background when the selected connection is not using the correct keyspace yet.

This causes an exception to be logged and the query not being prepared on the newly UP host. As expected, there is no failure yielded to the user.

This mechanism was introduced in CSHARP-506.

I was able to reproduce it in the endurance tests (using .NET Core 2.1):

Environment

None

Activity

Show:
Joao Reis
February 11, 2020, 7:02 PM

Flag added

merged to OSS

Joao Reis
February 13, 2020, 6:44 PM

Flag removed

merged to dse

Assignee

Unassigned

Reporter

Jorge Bay Gondra

Labels

None

Reproduced in

None

PM Priority

None

Fix versions

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

Pull Requests

None

Size

None

Priority

Minor
Configure