河野 隆志
takas****@gmo-m*****
2012年 5月 7日 (月) 17:45:39 JST
河野です 現在進行形で調査中です。 で、分かったことですが、2台のmroonga Slaveが同時刻(1秒ずれですが誤差でしょ う)で、同じクエリの箇所で同じエラーで止まっていました。 selectはとりあえず置いておいて、更新系クエリはSQLの書式が間違ってるのも 多々流れていまして(随時修正中ですが大量過ぎて…)REPLACE INTO文も 書き方が間違っている内容のが流れていました。 これがトリガーになったのか もしれませんね。以前REPLACE文で問題があった時はエラーでレプリケーション が止まるだけだったんですが… とりあえずREPLACE文の書き方を直していきます。 追加ですが、該当テーブルは1千万件以上のデータが入っています。 > 初めて見るタイプな気がします。 > バックトレースを見るとマルチカラムインデックスの更新時にクラッ > シュしたようです。 マルチカラムインデックスはありますね。 エラーで止まったREPLACE文は以下の通りです。これ以外の更新系クエリも流れ ます。 REPLACE INTO table_name ( id, gs_id, s_id, type, width, height, size, hash, title, fname, eaddr, rdate, udate, flag2, flag5, score5, tags, dir, uid) VALUES ( '12345678', '1', '123456', 'jpeg', '120', '120', '12345', 'hashhashhashhashhashhashhashhashhashhashhashhashhas', '河野隆志', 'ja', 'takas****@gmo-m*****', '2012-05-05 13:25:46', NOW(), '1', '0', '1', '', '0', 'kawano2012') テーブル定義は以下の通りです。 CREATE TABLE `table_name` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `gs_id` tinyint(4) NOT NULL, `s_id` int(11) NOT NULL, `type` varchar(16) NOT NULL, `width` int(11) NOT NULL, `height` int(11) NOT NULL, `size` int(11) NOT NULL, `hash` varchar(64) NOT NULL, `title` varchar(255) NOT NULL, `fname` varchar(81) NOT NULL, `eaddr` varchar(255) DEFAULT NULL, `rdate` datetime NOT NULL, `udate` datetime NOT NULL, `flag1` tinyint(4) DEFAULT '0', `flag2` tinyint(4) DEFAULT '0', `flag3` tinyint(4) DEFAULT '0', `flag4` tinyint(4) DEFAULT '0', `flag5` tinyint(4) DEFAULT '0', `flag6` tinyint(4) DEFAULT '0', `flag7` tinyint(4) DEFAULT '0', `flag8` tinyint(4) DEFAULT '0', `flag9` tinyint(4) DEFAULT '0', `flag10` tinyint(4) DEFAULT '0', `score1` int(11) DEFAULT '0', `score2` int(11) DEFAULT '0', `score3` int(11) DEFAULT '0', `score4` int(11) DEFAULT '0', `score5` int(11) DEFAULT '0', `score6` int(11) DEFAULT '0', `score7` int(11) DEFAULT '0', `score8` int(11) DEFAULT '0', `score9` int(11) DEFAULT '0', `score10` int(11) DEFAULT '0', `tags` varchar(255) DEFAULT NULL, `text` text, `server` tinyint(4) NOT NULL, `dir` tinyint(4) NOT NULL, `uid` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `index1` (`fname`), KEY `index2` (`rdate`,`gs_id`,`flag5`), KEY `index3` (`s_id`,`gs_id`,`rdate`), FULLTEXT KEY `fu_index1` (`title`,`tags`,`text`) ) ENGINE=mroonga DEFAULT CHARSET=utf8 以上、宜しくお願い致します。 -- 河野 隆志 <takas****@gmo-m*****>