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: query mismatch with non-intersecting OR and nested AND condition #5452

Merged
merged 2 commits into from Mar 6, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Mar 6, 2024

What type of PR is this?

/kind bug
/area core
/milestone 2.14.x

What this PR does / why we need it:

修复了索引查询使用含有 OR 条件嵌套 AND 条件时若匹配数据集间无交集导致的查询结果不正确的问题

如伪查询:or(query, and(otherQuery1, otherQuery2))
问题描述:当 query 匹配的结果与 and(otherQuery1, otherQuery2) 匹配的结果无交集时 and 会将自身不匹配的数据剔除导致 query 无法匹配到而出现缺少数据的问题

Does this PR introduce a user-facing change?

None

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Mar 6, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.14.x milestone Mar 6, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Mar 6, 2024
@guqing
Copy link
Member Author

guqing commented Mar 6, 2024

/cherry-pick release-2.13

@halo-dev-bot
Copy link
Collaborator

@guqing: once the present PR merges, I will cherry-pick it on top of release-2.13 in a new PR and assign it to you.

In response to this:

/cherry-pick release-2.13

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.

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.86%. Comparing base (5fdf6c0) to head (5a96068).
Report is 41 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5452      +/-   ##
============================================
- Coverage     56.91%   56.86%   -0.05%     
- Complexity     3319     3341      +22     
============================================
  Files           587      589       +2     
  Lines         18968    19144     +176     
  Branches       1401     1394       -7     
============================================
+ Hits          10795    10887      +92     
- Misses         7594     7674      +80     
- Partials        579      583       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Mar 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Mar 6, 2024
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

f2c-ci-robot bot commented Mar 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 5281eb0 into halo-dev:main Mar 6, 2024
8 checks passed
@halo-dev-bot
Copy link
Collaborator

@guqing: new pull request created: #5455

In response to this:

/cherry-pick release-2.13

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.

f2c-ci-robot bot pushed a commit that referenced this pull request Mar 6, 2024
…d AND condition (#5455)

This is an automated cherry-pick of #5452

/assign guqing

```release-note
None
```
@guqing guqing deleted the fix/index-and-query branch March 6, 2024 10:01
@ruibaby ruibaby modified the milestones: 2.14.x, 2.14.0 Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants