pingcap / tiup

A component manager for TiDB
https://tiup.io
Apache License 2.0
411 stars 304 forks source link

ERROR 8256 (HY000): Check ingest environment failed: no enough space in /tmp/tidb/tmp_ddl-4000 #2434

Open yahonda opened 2 weeks ago

yahonda commented 2 weeks ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

    
    % tiup -v
    1.16.0 tiup
    Go Version: go1.21.11
    Git Ref: v1.16.0
    GitHash: e543145831d44a863366ff8c379d25980730bbd1
    % tiup playground
    Note: Version constraint  is resolved to v8.1.0. If you'd like to use other versions:
    
    Use exact version:      tiup playground v7.1.0
    Use version range:      tiup playground ^5
    Use nightly:            tiup playground nightly

Start pd instance:v8.1.0 Start tikv instance:v8.1.0 Start tidb instance:v8.1.0 Waiting for tidb instances ready 127.0.0.1:4000 ... Done Start tiflash instance:v8.1.0 Waiting for tiflash instances ready 127.0.0.1:3930 ... Done

🎉 TiDB Playground Cluster is started, enjoy!

Connect TiDB: mysql --comments --host 127.0.0.1 --port 4000 -u root TiDB Dashboard: http://127.0.0.1:2379/dashboard Grafana: http://127.0.0.1:3000


- Connect to the TiDB Playground Cluster using mysql client

% mysql --comments --host 127.0.0.1 --port 4000 -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1421869062 Server version: 8.0.11-TiDB-v8.1.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 8.0 compatible

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database mydatabase; Query OK, 0 rows affected (0.17 sec)

mysql> use mydatabase; Database changed mysql> CREATE TABLE django_content_type (id integer AUTO_INCREMENT NOT NULL PRIMARY KEY, name varchar(100) NOT NULL, app_label varchar(100) NOT NULL, model varchar(100) NOT NULL); Query OK, 0 rows affected (0.12 sec)

mysql> ALTER TABLE django_content_type ADD CONSTRAINT django_content_type_app_label_model_76bd3d3b_uniq UNIQUE (app_label, model); ERROR 8256 (HY000): Check ingest environment failed: no enough space in /tmp/tidb/tmp_ddl-4000 mysql>


2. What did you expect to see?
This DDL should run successfully.

```sql
ALTER TABLE `django_content_type` ADD CONSTRAINT `django_content_type_app_label_model_76bd3d3b_uniq` UNIQUE (`app_label`, `model`);
  1. What did you see instead? It gets ERROR 8256 (HY000): Check ingest environment failed: no enough space in /tmp/tidb/tmp_ddl-4000.

    mysql> ALTER TABLE `django_content_type` ADD CONSTRAINT `django_content_type_app_label_model_76bd3d3b_uniq` UNIQUE (`app_label`, `model`);
    ERROR 8256 (HY000): Check ingest environment failed: no enough space in /tmp/tidb/tmp_ddl-4000
    mysql>
  2. What version of TiUP are you using (tiup --version)?

    % tiup --version
    1.16.0 tiup
    Go Version: go1.21.11
    Git Ref: v1.16.0
    GitHash: e543145831d44a863366ff8c379d25980730bbd1
yahonda commented 2 weeks ago

Here is a workaround found for this error. I assume this is related to DXF.

% mysql --comments --host 127.0.0.1 --port 4000 -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1421869066
Server version: 8.0.11-TiDB-v8.1.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 8.0 compatible

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mydatabase;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> set global tidb_ddl_enable_fast_reorg = off;
Query OK, 0 rows affected (0.05 sec)

mysql> set global tidb_enable_dist_task = off;
Query OK, 0 rows affected (0.02 sec)

mysql> ALTER TABLE `django_content_type` ADD CONSTRAINT `django_content_type_app_label_model_76bd3d3b_uniq` UNIQUE (`app_label`, `model`);
Query OK, 0 rows affected (0.59 sec)

mysql>
yahonda commented 2 weeks ago

This box has enough /tmp space available.

% df -h /tmp
Filesystem      Size    Used   Avail Capacity iused ifree %iused  Mounted on
/dev/disk1s2   466Gi   408Gi    41Gi    91%    7.3M  425M    2%   /System/Volumes/Data
%