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

branch-2.1: [Fix](auto-increment) Fix duplicate auto-increment column value problem #43774 #43984

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

Conversation

github-actions[bot]
Copy link
Contributor

Cherry-picked from #43774

…em (#43774)

```cpp
Result<int64_t> AutoIncIDBuffer::_fetch_ids_from_fe(size_t length) {
    // ...
    return _rpc_status;
}
```
should be
```cpp
Result<int64_t> AutoIncIDBuffer::_fetch_ids_from_fe(size_t length) {
    // ...
    return ResultError(_rpc_status);
}
```
Otherwise, the returned `Result<int64_t>`'s `m_has_val` will be `true`,
then `AutoIncIDBuffer::_launch_async_fetch_task()` will wrongly add an
auto-increment range [0, length) to `_buffers` which will cause
duplicate value problem.

### Release note

Fix duplicate auto-increment column value problem in some situations.
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@doris-robot
Copy link

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.36% (9485/26089)
Line Coverage: 27.89% (78133/280100)
Region Coverage: 26.55% (40073/150944)
Branch Coverage: 23.33% (20349/87216)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b7bd02660b01842c70dc50d0b53352f10583287b_b7bd02660b01842c70dc50d0b53352f10583287b/report/index.html

@dataroaring dataroaring reopened this Nov 15, 2024
Copy link
Contributor Author

clang-tidy review says "All clean, LGTM! 👍"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants