当前位置:网站首页>GBase 8a的create database 会被查询耗时很长怀疑卡住的现象分析
GBase 8a的create database 会被查询耗时很长怀疑卡住的现象分析
2022-06-27 19:33:00 【生命之源;】
在GBase 8a里,create database是权限最高的DDL语句,其需要一个db_lock独占锁,如果其它SQL在使用该库,则需要等待,从现象看是被卡住了。即使运行create database if not exists一样要等待锁。
现象
如下的一个create database语句,已经等待了130秒没有返回。
最后用户取消了,显示信息如下:
可以看到是无法拿到锁,取消了等待锁的操作。
排查
再次运行create database语句,然后执行gcadmin showlock,查看集群锁的情况
可以看到IP为12节点的401398进程(下面的2个红框),没有拿到db_lock的锁(FALSE),该锁被IP为14的254505拿到了。连接14节点,查看进程

发现该节点的进程正在做insert select操作,且已经执行了3266秒。
解决
等待该SQL完成
确认该业务不重要,kill掉
人工确认数据库已存在,不要运行create database语句
总结
create database一般都是运行在系统初始化阶段,在业务升级时,是不需要重建数据库的。而在业务升级时,涉及到【重建】库,肯定要先停掉现有业务,才能操作,也不会出现这个现象。
所以,除了初始化,其它的业务升级,不要包含create database 语句。
边栏推荐
- Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
- Special training of guessing game
- DO280OpenShift访问控制--security policy和章节实验
- Go从入门到实战——Context与任务取消(笔记)
- 神奇的POI读取excel模板文件报错
- AI 绘画极简教程
- Galaxy Kirin system LAN file sharing tutorial
- 抖音的兴趣电商已经碰到流量天花板?
- 鲜为人知的mysql导入数据
- gomock mockgen : unknown embedded interface
猜你喜欢

Codeforces Global Round 14

Bit.Store:熊市漫漫,稳定Staking产品或成主旋律

Bit. Store: long bear market, stable stacking products may become the main theme

Go从入门到实战——channel的关闭和广播(笔记)

A set of system to reduce 10 times the traffic pressure in crowded areas

Save method of JPA stepping pit series

Go from introduction to practice -- coordination mechanism (note)

Go from starting to Real - Interface (note)

空指针异常

100 important knowledge points that SQL must master: sorting and retrieving data
随机推荐
GBase 8a OLAP分析函数cume_dist的使用样例
Scrum和看板的区别
分享|智慧环保-生态文明信息化解决方案(附PDF)
Go从入门到实战——接口(笔记)
MySQL client tools are recommended. I can't imagine that it is best to use Juran
oracle迁移mysql唯一索引大小写不区分别怕
请教CMS小程序首页的幻灯片在哪里设置?
Release of global Unicorn list in 2021: the full list of 301 Unicorn enterprises in China is coming!
Bit. Store: long bear market, stable stacking products may become the main theme
Codeforces Round #719 (Div. 3)
Process control task
squid代理服务器
Data platform scheduling upgrade and transformation | operation practice from Azkaban smooth transition to Apache dolphin scheduler
Go from introduction to actual combat - all tasks completed (notes)
Focus! Tips for installing fonts on domestic computers
JVM memory structure when creating objects
TypeScript学习
io流代码
TreeSet详解
集合代码练习