canvas-lms/gems
Brian Palmer 6f7e610124 support cassandra 1.2+ consistency level usage
This changed from a part of the query string in cassandra 1.1 to a
separate parameter passed to execute in cassandra 1.2 and above.
Unfortunately we need to jump through some hoops to support both, until
we've fully upgraded to 1.2.

This commit adds a placeholder to the query string %CONSISTENCY% that
will be replaced with the chosen level in 1.1, and replaced with the
empty string in 1.2. Once we've upgraded to 1.2, we can remove all this
as it'll just be another option to the method.

closes CNVS-9273

test plan:

Using each of cassandra 1.1, 1.2, and 2.0:

* Clear out the consistency level Settings
  * Setting.connection.delete("DELETE FROM settings WHERE name LIKE 'event_stream.%_consistency%'")
  * Verify that page views and audit logs can be fetched, verify in the
    rails logs that no consistency level is given in the CQL query
    lines
* Set the consistency level
  * Setting.set('event_stream.read_consistency', 'ONE')
  * Verify that page views and audit logs can be fetched, verify in the
    rails logs that consistency level "ONE" is given in the CQL query
    lines. In 1.1, this will be in the query string, in 1.2 and 2.0 it
    will follow the query in an options hash

Change-Id: I3d007376d096e6ed31a40e699e77dca4cdd065a2
Reviewed-on: https://gerrit.instructure.com/35171
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-05-23 18:53:25 +00:00
..
active_polymorph active_polymorph 2014-05-19 22:05:09 +00:00
activesupport-suspend_callbacks add gem names to gem script runners 2014-04-28 15:51:28 +00:00
acts_as_list discussion topics: fix sorting nil positions 2014-05-08 21:17:21 +00:00
adheres_to_policy add gem names to gem script runners 2014-04-28 15:51:28 +00:00
bookmarked_collection add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_breach_mitigation add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_cassandra support cassandra 1.2+ consistency level usage 2014-05-23 18:53:25 +00:00
canvas_color extract color gem 2014-02-27 17:38:32 +00:00
canvas_crummy spec: canvas rspec rake task for vendored_gems 2014-02-24 05:47:34 +00:00
canvas_ember_url make show/moderate/statistics actions redirect to fabulous quizzes when enabled 2014-05-03 18:18:56 +00:00
canvas_ext add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_http add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_kaltura add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_mimetype_fu add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_quiz_statistics Ember Quiz Stats - File Upload & Formula 2014-05-22 15:56:45 +00:00
canvas_sanitize allow h1 tags in html sanitation 2014-04-17 04:33:02 +00:00
canvas_sort add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_statsd send delayed jobs stats to statsd 2014-05-15 21:16:14 +00:00
canvas_stringex add gem names to gem script runners 2014-04-28 15:51:28 +00:00
canvas_text_helper extract lib/text_helper to gems/canvas_text_helper 2014-04-30 15:18:40 +00:00
canvas_time Move time related code into canvas_time gem 2014-04-14 20:47:01 +00:00
canvas_uuid extract auto_handle to new canvas_uuid gem 2014-02-25 19:30:59 +00:00
event_stream support cassandra 1.2+ consistency level usage 2014-05-23 18:53:25 +00:00
facebook fixed indentation 2014-05-05 22:32:26 +00:00
google_docs fix indentation and remove commented out code 2014-05-07 18:33:06 +00:00
handlebars_tasks don't require execjs until needed inside the task 2014-05-06 15:41:43 +00:00
html_text_helper extract lib/text_helper to gems/canvas_text_helper 2014-04-30 15:18:40 +00:00
i18n_extraction add gem names to gem script runners 2014-04-28 15:51:28 +00:00
i18n_tasks add gem names to gem script runners 2014-04-28 15:51:28 +00:00
incoming_mail_processor extract lib/text_helper to gems/canvas_text_helper 2014-04-30 15:18:40 +00:00
json_token add gem names to gem script runners 2014-04-28 15:51:28 +00:00
linked_in add gem names to gem script runners 2014-04-28 15:51:28 +00:00
lti_outbound refactor variable substitution out of the models 2014-05-21 14:58:01 +00:00
multipart add gem names to gem script runners 2014-04-28 15:51:28 +00:00
paginated_collection add gem names to gem script runners 2014-04-28 15:51:28 +00:00
twitter fixed code indentation 2014-05-05 20:08:42 +00:00
utf8_cleaner add gem names to gem script runners 2014-04-28 15:51:28 +00:00
workflow loosen rails version requirements for gems 2014-04-10 20:28:03 +00:00
test_all_gems.sh spec: vendor_gems test.sh result determination tweak 2014-02-24 19:54:21 +00:00