影响版本
OceanBase 数据库 V1.4.7x 版本。
问题现象
合并超时,错误信息如下。
grep "The partition is doing other task now, can not merge" observer.log
[2020-09-05 13:52:30.196099] INFO [STORAGE.COMPACTION] ob_partition_merge_task.cpp:318 [63953][YB42A80500E5-0005AE8A88F20492] [lt=4] The partition is doing other task now, can not merge, (partition_key={tid:1111606255873511, partition_id:0, part_cnt:0}, ret=-4023)
可能原因
可通过 tid 确认创建全文索引的表上是否有索引生效。
确认表名,其中
log_tid为错误信息中的 tid。obclient> SELECT table_name FROM __all_table WHERE table_id='log_tid';确认是否存在不可用索引,其中
table_name为上面步骤的查询结果。如果 STATUS 列为 unavailable,则表示索引不可用。
obclient> SHOW INDEX FROM table_name;检查租户的 DDL 记录,查询创建全文索引的 DDL 语句,其中
table_name为表名tenant_id为表所属租户的 id。obclient> SELECT gmt_create,ddl_stmt_str FROM __all_ddl_operation WHERE table_name='table_name' AND exec_tenant_id='tenant_id'
OceanBase 数据库 V1.4.7x 版本中,全文索引会在合并发起时创建,如果全文索引创建失败,会导致合并超时。
解决方式
通过以下语句删除全文索引,其中
index_name为在表上添加的全文索引名称。obclient> ALTER TABLE <table_name> DROP FULLTEXT <index_name>;重新执行合并。
obclient> ALTER SYSTEM MAJOR FREEZE;