-
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
ddl: use length to determine if the slice is empty #41862
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/build |
@@ -1870,7 +1870,7 @@ func getNextPartitionInfo(reorg *reorgInfo, t table.PartitionedTable, currPhysic | |||
// During index re-creation, process data from partitions to be added | |||
nextPartitionDefs = pi.AddingDefinitions | |||
} | |||
if nextPartitionDefs == nil { | |||
if len(nextPartitionDefs) == 0 { |
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.
Do we have a test to test it? Like check txn-merge
or lightning-merge
.
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.
Updated. PTAL
Why can not add a test? only manual test? |
@zimulala @Benjamin2037 I think it is related to the BR restore: Line 531 in 7d7350f
In the Line 1179 in 7d7350f
It is not easy to write a unit test for this... Maybe we need an integration test or e2e test. |
/run-br-integration-test |
/run-integration-br-test |
/run-integration-br-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
/run-integration-br-test |
/run-integration-br-test |
/run-integration-br-test |
/run-integration-br-test |
I confirmed that error can be detected by adding integration test.
|
/run-integration-br-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
/retest |
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.
rest LGTM
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
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.
please add the link about this issue.
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.
Updated.
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 70a2caf
|
/retest |
/retest because of unstable test #42061. |
@tangenta: The
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What problem does this PR solve?
Issue Number: close #41559
Problem Summary:
pi.AddingDefinitions
is possible to be an empty slice, which is not equal tonil
.What is changed and how it works?
Use
len(pi.AddingDefinitions)
to determine if the slice is empty.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.