Maybe add "reprepare on UP" behavior

Description

In 3.x, every time a node comes back up, we reprepare all known prepared statements before making the node available for requests.

Evaluate the cost of doing that in 4.x: this might not be trivial given the current architecture (things are more modular, NodeStateManager has no trivial way to get hold of a connection to re-issue the PREPARE calls). Alternatively, we could rely exclusively on the prepare-and-retry feature to reprepare the statements as they get used.

I don't mind making changes to make reprepare-on-up work, but if the performance gain is minimal I'd rather keep the architecture simple.

Environment

None

Pull Requests

None

Activity

Show:
Olivier Michallat
June 16, 2017, 4:39 PM

CASSANDRA-8831 already reprepares statements when a node comes back up, so added nodes is the only case we have to worry about.

Olivier Michallat
June 16, 2017, 4:55 PM

One thing that could alleviate the pressure of re-preparing on the fly would be to coordinate client-side to ensure that only one PREPARE query is sent, and the other request wait on it.

Olivier Michallat
June 21, 2017, 11:59 PM
Edited

3c43b79 makes this ticket much easier to implement.

Fixed

Assignee

Olivier Michallat

Reporter

Olivier Michallat

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