TimesTen 自动刷新的 cachegroup 数据不同步

     话说本人有一套TT的测试环境,架构是一个TT内存库+一个oracle数据库,分别部署在不同的机器上。 TT上定义了一个autorefresh 的cachgroup 关联oracle 中的某张单表。

测试的时候,跑得好好的,昨天突然就不更新数据了。然后各种检查,发现cacheagent 是活着的,最后刷新时间停留在前天晚上(昨天早上发现数据不能同步的)。我就纳闷了,这是为什么呢? 突然想到,前天晚上电力调整,TT所关联的oracle 数据库被关闭过,来电之后再起的。所以怀疑是oracle关闭之后,cacheagent 尝试与之联系,发现总是不能联系上,当达到一个最大尝试次数之后,就不再尝试,所以当oracle 起来之后,依然数据不进行更新。

     抱着这个猜测,重启TT 的cacheagent 。

Command> call ttCacheStop;
Command> call ttCacheStart;


哈哈,发现数据上来了。

所以,在这里总结一下,当TT所关联的oracle数据库故障之后,最好重启一下cacheagent  ,以避免cachegroup 刷新失败。



问题:自动刷新的cachegroup 数据不同步(刷新失败)

问题着手点:

1、检查cacheagent
[timesten@timesten ~]$ ttStatus

2、检查cachegroup 相关信息

使用 ttCacheAutorefreshStatsGet 存储过程来返回指定的cache group最近10个自动刷新操作。
如:
ttIsql "DSN=tt_1122;UID=cacheuser;PWD=timesten;OraclePWD=oracle"
Command> call ttcacheautorefreshstatsget('user1','testcache');

< 1164260, 2007-07-23 15:43:52.000000, 850280, 44, 0, 75464, 528255, 75464, 310, 110, 6800,
1890912, 12439795, 1890912, 160020, InProgress >
< 1164260, 2007-07-23 15:43:33.000000, 831700, 43, 13550, 108544, 759808, 108544, 1030, 230,
12290, 1815448, 11911540, 1815448, 160020, Complete >
< 1164260, 2007-07-23 15:43:12.000000, 810230, 42, 17040, 115712, 809984, 115712, 610, 330,
16090, 1706904, 11151732, 1706904, 146470, Complete >
< 1164260, 2007-07-23 15:42:52.000000, 790190, 41, 14300, 94208, 659456, 94208,560, 320,
13410, 1591192, 10341748, 1591192, 129430, Complete >
< 1164260, 2007-07-23 15:42:32.000000, 770180, 40, 12080, 99328, 695296, 99328,450, 290,
11340, 1496984, 9682292, 1496984, 115130, Complete >
< 1164260, 2007-07-23 15:42:12.000000, 750130, 39, 10380, 86016, 598368, 86016,430, 230,
9720, 1397656, 8986996, 1397656, 103050, Complete >
< 1164260, 2007-07-23 15:41:52.000000, 730130, 38, 13530, 112640, 700768, 112640, 530, 220,
12780, 1311640, 8388628, 1311640, 92670, Complete >
< 1164260, 2007-07-23 15:41:32.000000, 710120, 37, 9370, 56320, 326810, 56320, 310, 160,
8900, 1199000, 7687860, 1199000, 79140, Complete >
< 1164260, 2007-07-23 15:41:22.000000, 700120, 36, 2120, 10240, 50330, 10240, 50, 200, 1870,
1142680, 7361050, 1142680, 69770, Complete >
< 1164260, 2007-07-23 15:41:12.000000, 690110, 35, 0, 0, 0, 0, 0, 0, 0, 1132440, 7310720,
1132440, 67650, Complete >
10 rows found.

关于以上返回信息,可参见官方文档 Troubleshooting Guide ---Troubleshooting Oracle In-Memory Database Cache ---Monitoring autorefresh cache groups。

另外通过在相关联的oracle数据库上执行以下脚本,来监控cachegroup。
install_dir/oraclescripts/cacheInfo.sql

The cacheInfo script displays the following information for each cached table:

% cd TimesTen_install_dir/oraclescripts
% sqlplus cacheuser/oracle
SQL> @cacheInfo
*************Autorefresh Objects Information ***************
Host name: sys1
Timesten datastore name: /users/OracleCache/alone1
Cache table name: ORATT.ORDERS
Change log table name: tt_06_69245_L
Number of rows in change log table: 100000
Maximum logseq on the change log table: 38
Timesten has autorefreshed updates up to logseq: 38
Number of updates waiting to be autorefreshed: 0
Number of updates that has not been marked with a valid logseq: 0
****************************

二、诊断自动刷新cache group 的性能问题
使用该命令
ttTraceMon




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章