Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 10.0.1
-
Fix Version/s: 10.0.2
-
Component/s: Storage Engine - Cassandra
-
Labels:
Description
Since Cassandra is by nature a shared storage which can be accessed (and modified) through different Cassandra SE tables, doing it from a server where query cache is enabled is likely to produce wrong results. Of course, the workaround is to use SQL_NO_CACHE in a query, but it's error-prone. Besides, generally a user would have no way to know whether the storage gets updated or not, so they'll have to set SQL_NO_CACHE every time; and if so, it makes sense to either force disabling query cache for Cassandra tables, or to provide a system-wide parameter for doing so.
Example of the problem:
cqlsh:manual_test> create columnfamily cf1 ( rowkey int primary key, a int );
drop table if exists t1, t2; create table t1 (rowkey int primary key, a int) engine=cassandra keyspace='manual_test' column_family='cf1'; create table t2 like t1; set global query_cache_size=1024*1024; select * from t1; # Empty set (0.01 sec) insert into t2 values (1,1); select * from t1; # Empty set (0.00 sec) select sql_no_cache * from t1; # +--------+------+ # | rowkey | a | # +--------+------+ # | 1 | 1 | # +--------+------+ # 1 row in set (0.01 sec)
revision-id: psergey@askmonty.org-20121224043622-xn8g8y3vhtu1lb3w revno: 3459 branch: 10.0-base-cassandra
Gliffy Diagrams
Attachments
Issue Links
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Discussed with Sanja: it seems, query cache should be disabled for cassandra tables. This can be achieved like this:
ha_cassandra::table_cache_type()
{ return HA_CACHE_TBL_NOCACHE; }