Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix insert into mode is not restriction for BE storage_flood_stage_usage_percent param #36657

Open
wants to merge 6 commits into
base: branch-2.1
Choose a base branch
from

Conversation

dh-cloud
Copy link
Contributor

@dh-cloud dh-cloud commented Jun 21, 2024

Steps to reproduce:

1,Create Doris ENV

3 FE + 4 BE
FE have  one data path:/data1
BE have  one data path:/data1

2,Create table

create table test(
    id                bigint       not null,
    name               varchar(100)
)
duplicate key(id)
distributed by hash(id) buckets 1
properties (
   "replication_num" = "3"
);

3,modify all BE param & restart doris

BE.storage_flood_stage_usage_percent=1
-- set to 100T
BE.storage_flood_stage_left_capacity_bytes=1099511627776

4,insert data

insert into test  values (1,'test_name');

5,result

Query OK, 1 row affected (0.09 sec)
{'label':'label_1bfb0be2ee8b424f_8f9a3a25ca638bc1', 'status':'VISIBLE', 'txnId':'4419'}

6,after fix:

ERROR 1105 (HY000) at line 1: errCode = 2, detailMessage = (be0)[E-232]disk 10878111130781813261 exceed capacity limit.

[ci skip]

Proposed changes

Issue Number: close #xxx

…age_percent param

# Steps to reproduce:
## 1,Create Doris ENV

```
3 FE + 4 BE
FE have  one data path:/data1
BE have  one data path:/data1
```

## 2,Create table

```
create table test(
    id                bigint       not null,
    name               varchar(100)
)
duplicate key(id1)
distributed by hash(id1) buckets 1
properties (
   "replication_num" = "3"
);
```

## 3,modify all BE param & restart doris

```
BE.storage_flood_stage_usage_percent=1
-- set to 100T
BE.storage_flood_stage_left_capacity_bytes=1099511627776
```
## 4,insert data

```
insert into test  values (1,'test_name');
```

## 5,result
```
Query OK, 1 row affected (0.09 sec)
{'label':'label_1bfb0be2ee8b424f_8f9a3a25ca638bc1', 'status':'VISIBLE', 'txnId':'4419'}
```

## 6,after fix:

```
ERROR 1105 (HY000) at line 1: errCode = 2, detailMessage = (be0)[E-232]disk 10878111130781813261 exceed capacity limit.

```
[ci skip]
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@gavinchou gavinchou changed the title Fix insert into mode is not restriction for BE storage_flood_stage_us… Fix insert into mode is not restriction for BE storage_flood_stage_usage_percent param Jun 22, 2024
@gavinchou
Copy link
Contributor

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.34% (9148/25171)
Line Coverage: 27.87% (74584/267584)
Region Coverage: 26.79% (38475/143629)
Branch Coverage: 23.48% (19491/83022)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b541f00968292146689dc1faf92089e72a4a0f7a_b541f00968292146689dc1faf92089e72a4a0f7a/report/index.html

@gavinchou gavinchou requested a review from platoneko June 22, 2024 12:42
dh-cloud added 2 commits June 26, 2024 10:25
Fix insert into mode is not restriction for BE storage_flood_stage_usage_percent param
Fix insert into mode is not restriction for BE storage_flood_stage_usage_percent param
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"


if (data_dir != nullptr &&
data_dir->reach_capacity_limit(stat.data_size + stat.index_size)) {
LOG(INFO) << "segment size is " << (stat.data_size + stat.index_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe debug log is better.
After disk usage is high, lots of these logs will take large disk space.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already change to DEBUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants