Mapper and Linq2Cql causes re-prepare warnings in scenarios with high concurrency

Description

https://github.com/datastax/csharp-driver/blob/786f3edae65f7726175394d650c900b7a2eda247/src/Cassandra/Mapping/Statements/StatementFactory.cs#L66-L70

GetOrAdd invokes the Func before any synchronization occurs. Potential solution is to implement this method on our CopyOnWriteDictionary (invoking the Func inside the lock).

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

Joao Reis

Labels

None

Reproduced in

None

PM Priority

None

Fix versions

None

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Epic Link

None

Sprint

Size

None

Priority

Major
Configure