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

planner, executor: set memory size to MAXUint64 for prepare plan cache test #8556

Merged
merged 10 commits into from
Dec 4, 2018

Conversation

XuHuaiyu
Copy link
Contributor

@XuHuaiyu XuHuaiyu commented Dec 3, 2018

What problem does this PR solve?

Set memory size to MAXUint64 for prepare plan cache test

What is changed and how it works?

The test for prepare plan cache is unstable caused by the machine memory utilization after #8339 .
So I set the memory size to MAX_Uint64 to make the test result stable every time.

Check List

Tests

  • No code

Code changes
N/A

Side effects
N/A

Related changes
N/A


This change is Reviewable

@XuHuaiyu XuHuaiyu added type/enhancement The issue or PR belongs to an enhancement. component/test labels Dec 3, 2018
@XuHuaiyu
Copy link
Contributor Author

XuHuaiyu commented Dec 3, 2018

PTAL @eurekaka @winoros

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

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

LGTM

@eurekaka eurekaka added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 3, 2018
@eurekaka
Copy link
Contributor

eurekaka commented Dec 3, 2018

/run-all-tests

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you remove the line of the error checking, which is related with memory.MemTotal()?

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

plannercore.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
plannercore.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

core.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
core.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

core.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
core.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

core.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
core.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

core.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
core.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

core.PreparedPlanCacheMaxMemory, err = memory.MemTotal()
// PreparedPlanCacheMaxMemory is set to MAX_UINT64 to make sure the cache
// behavior would not be effected by the uncertain memory utilization.
core.PreparedPlanCacheMaxMemory = math.MaxUint64
c.Assert(err, IsNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@XuHuaiyu
Copy link
Contributor Author

XuHuaiyu commented Dec 3, 2018

PTAL @dbjoa @winoros

@dbjoa
Copy link
Contributor

dbjoa commented Dec 3, 2018

LGTM

@dbjoa
Copy link
Contributor

dbjoa commented Dec 3, 2018

Please fix CI errors.

@XuHuaiyu
Copy link
Contributor Author

XuHuaiyu commented Dec 3, 2018

/run-integration-ddl-test

@XuHuaiyu
Copy link
Contributor Author

XuHuaiyu commented Dec 3, 2018

PTAL @winoros @zz-jason

zz-jason
zz-jason previously approved these changes Dec 3, 2018
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
Copy link
Member

zz-jason commented Dec 3, 2018

CI failed:

executor/prepared_test.go:710:49: undefined: memory

@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 Dec 3, 2018
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

@XuHuaiyu XuHuaiyu merged commit cbae4c6 into pingcap:master Dec 4, 2018
@XuHuaiyu XuHuaiyu deleted the cache_test branch December 4, 2018 02:53
iamzhoug37 pushed a commit to iamzhoug37/tidb that referenced this pull request Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants