Expose an API that tells if the schemas agree on all the peers

Description

When client executes a DDL query such as create table, driver sends the query and waits a configurable time for schemas to agree before returning. However even if the schemas disagree, it returns any way. The client has no way of knowing if the schemas agree or not. It will be good to expose an API that tells the client if the schemas agree on al peers.

Environment

None

Pull Requests

None

Activity

Show:
Olivier Michallat
April 3, 2015, 11:08 AM

Here's a preview of the new API:

  • after a DDL query, you can use resultSet.getExecutionInfo().isSchemaInAgreement() to check if peers agreed within the configurable time (Cluster.Builder.withMaxSchemaAgreementWaitSeconds).

  • at any time, you can perform a one-time check with cluster.getMetadata().checkSchemaAgreement(). This does not retry so maxSchemaAgreementWaitSeconds does not apply here (this gives more flexibility if you want to retry your own way with a specific schedule).

Olivier Michallat
March 18, 2015, 5:52 PM

Tentatively including in 2.0.10. This should be pretty straightforward.

Fixed

Assignee

Olivier Michallat

Reporter

Vishy Kasar

Labels

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Major