Do not hop DCs in DCAwarePolicy if the consistency is LOCAL_QUORUM or LOCAL_ONE

Description

If you use CL.LOCAL_QUORUM or CL.LOCAL_ONE, you really want the "LOCAL" part to mean "in my local datacenter". But if the policy ends up sending the query to another DC, this means the "LOCAL" is now whatever remote DC is, and that's probably not what you want as this might break your consistency guarantees.

So we should change the default so that for LOCAL_* queries, DCAwarePolicy does not return remote DC hosts even if we've allowed some remote fallbacks (those remote fallbacks will still be used for other CL of course). We'll leave the options to overwrite that behavior with a policy flag for the sake of not completely removing the current behavior, but we'll clearly document that using this flag is almost surely a bad idea.

Environment

None

Pull Requests

None

Activity

Show:
Sylvain Lebresne
March 17, 2014, 7:32 PM

Alright, patch committed to do exactly what's described above.

Assignee

Sylvain Lebresne

Reporter

Sylvain Lebresne

Labels

None

PM Priority

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure