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-3.0: [Fix](auto-increment) Fix duplicate auto-increment column value problem #43774 #43983

Merged
merged 1 commit into from
Nov 15, 2024

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

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

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

@bobhan1
Copy link
Contributor

bobhan1 commented Nov 15, 2024

run beut

@dataroaring dataroaring merged commit adfbe69 into branch-3.0 Nov 15, 2024
21 of 23 checks passed
@dataroaring dataroaring deleted the auto-pick-43774-branch-3.0 branch November 15, 2024 02:39
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