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: bitmap index large size cause panic error #38815

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

982945902
Copy link

template <>
size_t
BitmapIndex<std::string>::GetIndexDataSize() {
    auto index_data_size = 0;
    for (auto& pair : data_) {
        index_data_size +=
            pair.second.getSizeInBytes(false) + pair.first.size() + sizeof(size_t);
    }
    return index_data_size;
}

like this code , index_data_size type will atomic infer as int type that not as excepted size_t, when size is large, it will overflow, so i change it to size_t.

in my case Cardinality is about 90000000, the index_data_size will outrange of int max 2,147,483,647, casue return size is very verry big like 18446744073709551615, next alloc memory will throw exception.

@sre-ci-robot sre-ci-robot added the size/XS Denotes a PR that changes 0-9 lines. label Dec 27, 2024
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 982945902
To complete the pull request process, please assign liliu-z after the PR has been reviewed.
You can assign the PR to them by writing /assign @liliu-z in a comment when ready.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

mergify bot commented Dec 27, 2024

@982945902 Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.

@mergify mergify bot added the needs-dco DCO is missing in this pull request. label Dec 27, 2024
Copy link
Contributor

mergify bot commented Dec 27, 2024

@982945902

Invalid PR Title Format Detected

Your PR submission does not adhere to our required standards. To ensure clarity and consistency, please meet the following criteria:

  1. Title Format: The PR title must begin with one of these prefixes:
  • feat: for introducing a new feature.
  • fix: for bug fixes.
  • enhance: for improvements to existing functionality.
  • test: for add tests to existing functionality.
  • doc: for modifying documentation.
  • auto: for the pull request from bot.
  1. Description Requirement: The PR must include a non-empty description, detailing the changes and their impact.

Required Title Structure:

[Type]: [Description of the PR]

Where Type is one of feat, fix, enhance, test or doc.

Example:

enhance: improve search performance significantly 

Please review and update your PR to comply with these guidelines.

@982945902 982945902 changed the title fix bitmap index large size cause panic error fix: bitmap index large size cause panic error Dec 27, 2024
@mergify mergify bot added kind/bug Issues or changes related a bug and removed do-not-merge/invalid-pr-format labels Dec 27, 2024
Copy link
Contributor

mergify bot commented Dec 27, 2024

@982945902 Please associate the related issue to the body of your Pull Request. (eg. “issue: #”)

Copy link
Contributor

mergify bot commented Dec 27, 2024

@982945902 E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link
Contributor

mergify bot commented Dec 27, 2024

@982945902 go-sdk check failed, comment rerun go-sdk can trigger the job again.

Copy link
Contributor

mergify bot commented Dec 27, 2024

@982945902 cpp-unit-test check failed, comment rerun cpp-unit-test can trigger the job again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/missing-related-issue kind/bug Issues or changes related a bug needs-dco DCO is missing in this pull request. size/XS Denotes a PR that changes 0-9 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants