-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
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()
?
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
executor/prepared_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
planner/core/point_get_plan_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
planner/core/prepare_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
planner/core/prepare_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
planner/core/prepare_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
planner/core/prepare_test.go
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
LGTM |
Please fix CI errors. |
/run-integration-ddl-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CI failed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Code changes
N/A
Side effects
N/A
Related changes
N/A
This change is