had to change the level that marshalling is disabled for the data
redis so that marshalling can be enabled for cache
test plan:
* configure redis.yml
* configure cache_store.yml for development/production to be
cache_store: redis_store and nothing else
* open console
* Canvas.redis.set('a', 1); Canvas.redis.get('a') should return
"1" (as a string)
* Rails.cache.write('a', 1); Rails.cache.read('a') should return
1 (as a Fixnum)
* Canvas.redis.__getobj__.object_id should be the same as
Rails.cache.instance_variable_get(:@data).object_id
* netstat -an should show only one connection from your console
process to the redis server
* with an already populated cache (having used Canvas before
applying this commit), click around Canvas, and make sure
nothing breaks
Change-Id: I507b95af3ec35f65501bb61e428a3e8479b8f895
Reviewed-on: https://gerrit.instructure.com/48134
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs CNVS-17062
This wrapper will catch any usage of the redis commands that twemproxy
doesn't support, including in specs, so that they don't sneak through.
test plan: specs should still pass, and redis caching should continue to
work as before.
Change-Id: I88d74c23c92c8be9f49e9399d8acbaf8ba31513e
Reviewed-on: https://gerrit.instructure.com/44710
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
fixes CNVS-15414
This applies to rails3 as well, we just use the appropriate version of
redis-rails for each.
test plan: redis should work as before, for both cache and data.
Change-Id: Ic34729190936a133b908e31ff186934fa435c1b6
Reviewed-on: https://gerrit.instructure.com/40898
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
test plan:
- add a `timeout: 1` option to redis.yml
- confirm that rails cache and redis operations complete as normal
- to test timeout, you can set up a dummy tcp server that listens but
never accepts, add it to the redis config, and verify that the (first)
redis operation times out as expected. after the first, it'll be
blacklisted for 5m as usual.
Change-Id: I2494b4b319afffcf1ea6ab87eb1c3d7d3baec58b
Reviewed-on: https://gerrit.instructure.com/39895
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>