Failed to Create Index

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 创建索引失败

| username: 快乐的非鱼

【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】
【Reproduction Path】
The index was normal before, but today I wanted to optimize the SQL, and the index creation failed. Whether it’s a large table or a small table, the creation time is very long. Additionally, it reports a directory does not exist error. I haven’t restarted yet, so I’m not sure if it will be normal after a restart. I couldn’t find relevant information online. There is enough space.
【Encountered Problem: Problem Phenomenon and Impact】

【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots/Logs/Monitoring】

| username: 有猫万事足 | Original post link

A few days ago, I saw this issue. The solution is to create the corresponding directory mentioned in the error on the TiDB where the DDL job is being executed. Specifically, the directory /tmp/tidb/tmp_ddl-4000 could not be found on a certain TiDB machine.

| username: 快乐的非鱼 | Original post link

I have tried it and indeed this method works. It feels like a bug. I hope the official team can look into the cause and fix it.

| username: 我是咖啡哥 | Original post link

Hahaha, it’s this issue again. I encountered it this morning while testing index acceleration. I upgraded from v6.5.1, and this directory was not created automatically.

| username: Kongdom | Original post link

Hahaha, I encountered the same issue. In my case, it was a directory permission problem. I just granted the necessary permissions and it worked.

| username: zhanggame1 | Original post link

I remember someone encountered this problem a few days ago and had to manually add the directory.

| username: redgame | Original post link

It’s a bug.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.