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 oom action cancel bug #10993

Merged
merged 3 commits into from
Jul 1, 2019
Merged

Conversation

crazycs520
Copy link
Contributor

What problem does this PR solve?

set config.OOMAction = "cancel"
before this PR:

create table t1(a int primary key, b double);
insert into t1 values(3,2);

test> select sum(a) from t1 group by b;
+--------+
| sum(a) |
+--------+
| 3      |
+--------+
1 row in set
test> set @@tidb_mem_quota_query=1;
Query OK, 0 rows affected
test> select sum(a) from t1 group by b;
+--------+
| sum(a) |
+--------+
0 rows in set

After This PR:

test> select sum(a) from t1 group by b;
+--------+
| sum(a) |
+--------+
| 3      |
+--------+
1 row in set
Time: 0.006s
test> set @@tidb_mem_quota_query=1;
Query OK, 0 rows affected
Time: 0.001s
test> select sum(a) from t1 group by b;
(1105, u'Out Of Memory Quota![conn_id=1]')

What is changed and how it works?

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

Related changes

  • Need to cherry-pick to the release branch

@crazycs520 crazycs520 added the type/bugfix This PR fixes a bug. label Jun 30, 2019
@codecov
Copy link

codecov bot commented Jun 30, 2019

Codecov Report

Merging #10993 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #10993   +/-   ##
===========================================
  Coverage   81.0758%   81.0758%           
===========================================
  Files           418        418           
  Lines         89473      89473           
===========================================
  Hits          72541      72541           
  Misses        11710      11710           
  Partials       5222       5222

@codecov
Copy link

codecov bot commented Jun 30, 2019

Codecov Report

Merging #10993 into master will decrease coverage by 0.1508%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master     #10993        +/-   ##
================================================
- Coverage   81.1318%   80.9809%   -0.1509%     
================================================
  Files           419        418         -1     
  Lines         90316      89237      -1079     
================================================
- Hits          73275      72265      -1010     
+ Misses        11784      11738        -46     
+ Partials       5257       5234        -23

@crazycs520
Copy link
Contributor Author

/run-all-tests

@crazycs520
Copy link
Contributor Author

@zz-jason @tiancaiamao PTAL

@zz-jason zz-jason requested review from qw4990 and SunRunAway July 1, 2019 04:50
Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added priority/release-blocker This issue blocks a release. Please solve it ASAP. status/LGT1 Indicates that a PR has LGTM 1. sig/execution SIG execution labels Jul 1, 2019
@tiancaiamao
Copy link
Contributor

LGTM

@zz-jason
Copy link
Member

zz-jason commented Jul 1, 2019

needs to be cherry-picked to release-2.1 and release-3.0

@zz-jason zz-jason merged commit 1916eff into pingcap:master Jul 1, 2019
@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 1, 2019
crazycs520 added a commit to crazycs520/tidb that referenced this pull request Jul 1, 2019
crazycs520 added a commit to crazycs520/tidb that referenced this pull request Jul 1, 2019
zz-jason pushed a commit that referenced this pull request Jul 1, 2019
winkyao pushed a commit that referenced this pull request Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants