Skip to content

Conversation

@github-actions
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
@github-actions
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
@dataroaring dataroaring deleted the auto-pick-43774-branch-3.0 branch November 15, 2024 02:39
@gavinchou gavinchou mentioned this pull request Nov 26, 2024
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.

4 participants