Avoid usage of Session.execute String - Non-Idempotent Requests

Description

We need to double check all of our usages of session.execute("String") because of the driver's behavior with idempotentcy.

In particular

https://github.com/datastax/spark-cassandra-connector/blob/993bdd9d946fa49871abdadbb09982e177b2923d/connector/src/main/scala/com/datastax/spark/connector/rdd/partitioner/dht/TokenFactory.scala#L99

Is preformed only a single time so an attempt to look up the token factory name can fail once and never be retried. In pretty much all cases like this we need to build a statement and set idempotency to true.

Environment

None

Pull Requests

None

Activity

Show:
Russell Spitzer
September 23, 2020, 6:15 PM

There are some other usages, but they are all DDL so I think we don’t have to mess with those (CREATE, DROP, TRUNCATE)

Assignee

Piotr Kołaczkowski

Reporter

Russell Spitzer

Fix versions

None

Labels

None

Reviewer

None

Reviewer 2

None

Pull Request

None

Components

Affects versions

Priority

Major
Configure