Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] support unprepared statement errors. fix #11 #187

Merged
merged 2 commits into from
Apr 30, 2015

Conversation

thibaultcha
Copy link
Member

If Cassandra returns an unprepared error, the DAO will re-prepare it and try the query again. This fixes #11, and handles the case where Cassandra would go down, and then up again while Kong is still running.

Other changes:

  • docs: base_dao and the factory have been given a better documentation.
  • refactor:
    • kong_query is now the prefered term for _queries elements.
    • params becomes args_keys and values args for consistance with the driver.
    • The _execute method was renamed to _execute_kong_query and broken into smaller chunks.
    • Batch statements now need to use the raw _execute method (the new one, not the one renamed to _execute_kong_query.
    • Cassandra errors now also have the error code.

@thibaultcha thibaultcha changed the title feat: support unprepared statement errors. fix #11 [feature] support unprepared statement errors. fix #11 Apr 30, 2015
@thibaultcha thibaultcha force-pushed the fix/reprepare-statements branch from df0f50d to dc8c9a4 Compare April 30, 2015 00:55
If Cassandra returns an unprepared error, the DAO will re-prepare it
and try the query again. This fixes #11, and handles the case where
Cassandra would go down, and then up again while Kong is still running.

Other changes:

- docs: base_dao and the factory have been given a better documentation.
- refactor:
  - `kong_query` is now the prefered term for _queries elements.
  - `params` becomes `args_keys` and `values` `args` for consistance with the driver.
  - The `_execute` method was renamed to `_execute_kong_query` and broken into smaller chunks.
  - Batch statements now need to use the raw `_execute` method (the new one, not the one renamed to `_execute_kong_query`.
  - Cassandra errors now also have the error code.
@thibaultcha thibaultcha force-pushed the fix/reprepare-statements branch from dc8c9a4 to cdf94a0 Compare April 30, 2015 01:19
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling cdf94a0 on fix/reprepare-statements into * on master*.

thibaultcha added a commit that referenced this pull request Apr 30, 2015
[feature] support unprepared statement errors. fix #11
@thibaultcha thibaultcha merged commit 278edba into master Apr 30, 2015
@thibaultcha thibaultcha deleted the fix/reprepare-statements branch April 30, 2015 13:03
ctranxuan pushed a commit to streamdataio/kong that referenced this pull request Aug 25, 2015
[feature] support unprepared statement errors. fix Kong#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When Cassandra is temporarily down make sure the connection is resumed
2 participants