Prevent warning log when using Execution profile that specifies a different local DC

Description

In a multi-datacenter cluster, if the driver configures an execution profile that overrides the local-datacenter, a warning log is generated when queries are executed using that profile.

You specified dc2 as the local DC, but some contact points are from a different DC

This is because OptionalLocalDcHelper.checkLocalDatacenterCompatibility does not consider the execution profile associated with the load balancing policy for which the helper was created, and throws the warning when the specified contact-points are not part of the datacenter specified in the profile.

The queries are still executed successfully, but the warning leads users to believe there is something mis-configured when there isn't.

Environment

None

Pull Requests

None

Assignee

Greg Bestland

Reporter

Erik Merkle

Labels

None

PM Priority

None

Reproduced in

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Minor
Configure