楼主: mchdba

mysql cluster,持续研究,一点点深入,最终希望部署到生产环境去

[复制链接]
论坛徽章:
24
技术图书徽章
日期:2013-08-16 14:31:52问答徽章
日期:2013-11-04 08:53:14目光如炬
日期:2013-12-23 06:00:11目光如炬
日期:2013-12-30 06:00:11明星写手
日期:2014-02-22 06:00:12马上有钱
日期:2014-03-31 14:09:05沸羊羊
日期:2015-05-20 12:42:59秀才
日期:2015-06-24 13:05:36秀才
日期:2015-07-13 09:48:14
31#
发表于 2012-8-17 15:46 | 只看该作者

使用道具 举报

回复
论坛徽章:
27
优秀写手
日期:2013-12-18 09:29:09ITPUB季度 技术新星
日期:2012-08-15 14:50:13嫦娥
日期:2013-03-04 09:47:05数据库板块每日发贴之星
日期:2011-09-08 01:01:01数据库板块每日发贴之星
日期:2011-09-11 01:01:01数据库板块每日发贴之星
日期:2011-09-10 01:01:02数据库板块每日发贴之星
日期:2011-09-09 01:01:01ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:422013年新春福章
日期:2013-03-04 09:50:49
32#
 楼主| 发表于 2012-8-18 23:12 | 只看该作者
arron刘 发表于 2012-8-17 15:46

-- =============================================================================
【22】 管理台老是报警,诡异
-- =============================================================================
一次性批量录入了100W数据,管理节点控制台报如下信息:


ndb_mgm> Node 7: Data usage increased to 80%(64016 32K pages of total 80000)
Node 4: Data usage increased to 80%(64007 32K pages of total 80000)
Node 5: Data usage increased to 80%(64014 32K pages of total 80000)
Node 6: Data usage increased to 80%(64001 32K pages of total 80000)
Node 4: Data usage increased to 90%(72005 32K pages of total 80000)
Node 5: Data usage increased to 90%(72014 32K pages of total 80000)
Node 7: Data usage increased to 90%(72010 32K pages of total 80000)
Node 6: Data usage increased to 90%(72009 32K pages of total 80000)
Node 6: Data usage decreased to 89%(71772 32K pages of total 80000)
Node 7: Data usage decreased to 89%(71271 32K pages of total 80000)
Node 4: Data usage decreased to 89%(71215 32K pages of total 80000)
Node 5: Data usage decreased to 88%(70607 32K pages of total 80000)
Node 5: Data usage decreased to 79%(63850 32K pages of total 80000)
Node 7: Data usage decreased to 79%(63673 32K pages of total 80000)
Node 4: Data usage decreased to 78%(62947 32K pages of total 80000)
Node 6: Data usage decreased to 78%(62932 32K pages of total 80000)

没有搞懂这是什么情况呢?

使用道具 举报

回复
论坛徽章:
27
优秀写手
日期:2013-12-18 09:29:09ITPUB季度 技术新星
日期:2012-08-15 14:50:13嫦娥
日期:2013-03-04 09:47:05数据库板块每日发贴之星
日期:2011-09-08 01:01:01数据库板块每日发贴之星
日期:2011-09-11 01:01:01数据库板块每日发贴之星
日期:2011-09-10 01:01:02数据库板块每日发贴之星
日期:2011-09-09 01:01:01ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:422013年新春福章
日期:2013-03-04 09:50:49
33#
 楼主| 发表于 2012-8-19 17:03 | 只看该作者
-- =============================================================================
【23】 ERROR 1297 (HY000)
-- =============================================================================
mysql> insert into bu.up_2012 select * from test.up_2012 limit 1200000,10000;
ERROR 1297 (HY000): Got temporary error 899 'Rowid already allocated' from NDBCLUSTER
mysql>

【ok】网上都说需要调大datamemory,但是我的是磁盘表,应该不是这个原因,不得已只有restart cluster了试试了,还好搞定了!
mysql>  replace into bu.up_2012 select * from test.up_2012 limit 1200000,300000;
Query OK, 300000 rows affected (59.97 sec)
Records: 300000  Duplicates: 0  Warnings: 0

赞叹一句,网上关于STORAGE DISK ndbcluster table的测试的资料好少啊!

使用道具 举报

回复
论坛徽章:
27
优秀写手
日期:2013-12-18 09:29:09ITPUB季度 技术新星
日期:2012-08-15 14:50:13嫦娥
日期:2013-03-04 09:47:05数据库板块每日发贴之星
日期:2011-09-08 01:01:01数据库板块每日发贴之星
日期:2011-09-11 01:01:01数据库板块每日发贴之星
日期:2011-09-10 01:01:02数据库板块每日发贴之星
日期:2011-09-09 01:01:01ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:422013年新春福章
日期:2013-03-04 09:50:49
34#
 楼主| 发表于 2012-8-19 20:05 | 只看该作者
-- =============================================================================
【25】 修改了config.in之后,data node 启动,需要 ndbd --initial重新加载之后,
原有的*.dat数据文件无效,启动不起来,sql节点启动之后,show tables; 原来的磁盘表都不见了,诡异啊!
-- =============================================================================
1 修改config.inf
2 ndb_mgmd -f /usr/local/mysql/cluster-conf/config.ini --reload 重新加载管理节点
3 ndbd --initial  重新启动data node
4 service mysqld start
5 use bu; show tables; 原来的表不存在了,丢失了。

看的文档是说,原有的数据文件加载不了,我想问的是:
1 如果我已经导入了很多数据,这个时候发现自己的配置参数不合理,我要修改配置参数,能不能在线修改并生效。
2 如果1失败,我能否在重新启动管理节点之后,启动data node的时候,能加载进去以前的数据呢?

使用道具 举报

回复
论坛徽章:
25
ITPUB元老
日期:2005-02-28 12:57:00咸鸭蛋
日期:2013-02-07 11:51:42咸鸭蛋
日期:2013-02-08 09:48:51蜘蛛蛋
日期:2013-02-21 15:47:392013年新春福章
日期:2013-02-25 14:51:24咸鸭蛋
日期:2013-02-28 17:08:42蜘蛛蛋
日期:2013-03-29 16:17:14双黄蛋
日期:2013-04-11 16:11:04咸鸭蛋
日期:2013-05-07 11:55:14咸鸭蛋
日期:2013-05-28 10:46:24
35#
发表于 2012-8-20 10:06 | 只看该作者
想修改配置,需要以--initial或reload的方式重新启动ndb_mgmd
ndbd一般不需要--initial启动,只有当有文件文件损坏的时候,它会删除所有本地文件,然后从其他节点的member取回数据,如果其它都是down的,那数据库就丢失了

mysql cluster很不稳定,启动很可能失败,修改场数据前最好备份一下,实在不行全部--initial启动,恢复数据

使用道具 举报

回复
论坛徽章:
27
优秀写手
日期:2013-12-18 09:29:09ITPUB季度 技术新星
日期:2012-08-15 14:50:13嫦娥
日期:2013-03-04 09:47:05数据库板块每日发贴之星
日期:2011-09-08 01:01:01数据库板块每日发贴之星
日期:2011-09-11 01:01:01数据库板块每日发贴之星
日期:2011-09-10 01:01:02数据库板块每日发贴之星
日期:2011-09-09 01:01:01ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:422013年新春福章
日期:2013-03-04 09:50:49
36#
 楼主| 发表于 2012-8-20 11:06 | 只看该作者
kerlion 发表于 2012-8-20 10:06
想修改配置,需要以--initial或reload的方式重新启动ndb_mgmd
ndbd一般不需要--initial启动,只有当有文件 ...

你好,谢谢提醒,我记得了,我再去尝试试试看!

使用道具 举报

回复
论坛徽章:
27
优秀写手
日期:2013-12-18 09:29:09ITPUB季度 技术新星
日期:2012-08-15 14:50:13嫦娥
日期:2013-03-04 09:47:05数据库板块每日发贴之星
日期:2011-09-08 01:01:01数据库板块每日发贴之星
日期:2011-09-11 01:01:01数据库板块每日发贴之星
日期:2011-09-10 01:01:02数据库板块每日发贴之星
日期:2011-09-09 01:01:01ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:422013年新春福章
日期:2013-03-04 09:50:49
37#
 楼主| 发表于 2012-8-20 11:07 | 只看该作者
kerlion 发表于 2012-8-20 10:06
想修改配置,需要以--initial或reload的方式重新启动ndb_mgmd
ndbd一般不需要--initial启动,只有当有文件 ...

再请教一个小问题:

ERROR 1297 (HY000): Got temporary error 410 'REDO log files overloaded (decrease TimeBetweenLocalCheckpoints or increase NoOfFragmentLogFiles)' from NDBCLUSTER

cluster里面的 redo log file 在哪里可以看到,我知道undo log文件,但是不知道redo log file 在哪里呢?

使用道具 举报

回复
论坛徽章:
25
ITPUB元老
日期:2005-02-28 12:57:00咸鸭蛋
日期:2013-02-07 11:51:42咸鸭蛋
日期:2013-02-08 09:48:51蜘蛛蛋
日期:2013-02-21 15:47:392013年新春福章
日期:2013-02-25 14:51:24咸鸭蛋
日期:2013-02-28 17:08:42蜘蛛蛋
日期:2013-03-29 16:17:14双黄蛋
日期:2013-04-11 16:11:04咸鸭蛋
日期:2013-05-07 11:55:14咸鸭蛋
日期:2013-05-28 10:46:24
38#
发表于 2012-8-20 17:04 | 只看该作者
我也不知道,都是内部文件,也不用管,但有参数控制其大小

使用道具 举报

回复
论坛徽章:
27
优秀写手
日期:2013-12-18 09:29:09ITPUB季度 技术新星
日期:2012-08-15 14:50:13嫦娥
日期:2013-03-04 09:47:05数据库板块每日发贴之星
日期:2011-09-08 01:01:01数据库板块每日发贴之星
日期:2011-09-11 01:01:01数据库板块每日发贴之星
日期:2011-09-10 01:01:02数据库板块每日发贴之星
日期:2011-09-09 01:01:01ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:422013年新春福章
日期:2013-03-04 09:50:49
39#
 楼主| 发表于 2012-8-20 18:42 | 只看该作者
kerlion 发表于 2012-8-20 17:04
我也不知道,都是内部文件,也不用管,但有参数控制其大小

那个参数我知道的,有控制文件数量的,有控制文件大小的,但是就是不知道这些文件在哪里,也不知道redo log到底使用了多少?

使用道具 举报

回复
论坛徽章:
27
优秀写手
日期:2013-12-18 09:29:09ITPUB季度 技术新星
日期:2012-08-15 14:50:13嫦娥
日期:2013-03-04 09:47:05数据库板块每日发贴之星
日期:2011-09-08 01:01:01数据库板块每日发贴之星
日期:2011-09-11 01:01:01数据库板块每日发贴之星
日期:2011-09-10 01:01:02数据库板块每日发贴之星
日期:2011-09-09 01:01:01ITPUB十周年纪念徽章
日期:2011-11-01 16:26:59ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:422013年新春福章
日期:2013-03-04 09:50:49
40#
 楼主| 发表于 2012-8-27 15:33 | 只看该作者
本帖最后由 mchdba 于 2012-8-28 16:32 编辑

-- =============================================================================
【26】 批量insert 500W记录报错
-- =============================================================================
2012-08-26 00:37:25 [ndbd] INFO     -- findNeighbours from: 4861 old (left: 5 right: 5) new (65535 65535)
2012-08-26 00:37:25 [ndbd] INFO     -- Watchdog: User time: 976564  System time: 1189718
2012-08-26 00:37:25 [ndbd] WARNING  -- Watchdog: Warning overslept 410 ms, expected 100 ms.
2012-08-26 00:37:25 [ndbd] INFO     -- Arbitrator decided to shutdown this node
2012-08-26 00:37:25 [ndbd] INFO     -- QMGR (Line: 5975) 0x00000002
2012-08-26 00:37:25 [ndbd] INFO     -- Error handler shutting down system
2012-08-26 00:37:25 [ndbd] INFO     -- Error handler shutdown completed - exiting
2012-08-26 00:37:38 [ndbd] ALERT    -- Node 6: Forced node shutdown completed. Caused by error 2305: 'Node lost connection to other nodes and can not form a unpartitioned cluster, please investigate if there are error(s) on other node(s)(Arbitration error). Temporary error, restart node'.

[ok]:google之,大部分的方案都是 restart data node。

而且一般的ndbd启动无效,需要ndbd --initial 重新加载才行。

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表