Commit Graph

20664 Commits

Author SHA1 Message Date
dc9ec5b177 [opt]function use sse to opt match_ipv6_subnet (#38755) (#43513)
## Proposed changes
https://github.com/apache/doris/pull/38755
test
```
-------------------------------------------------------------------
Benchmark                         Time             CPU   Iterations
-------------------------------------------------------------------
BM_matchIPv6SubnetSSE          1.89 ns         1.89 ns   1000000000
BM_matchIPv6SubnetNative       4.99 ns         4.99 ns    561455254
```
2024-11-11 18:59:35 +08:00
55133f8e61 [fix](delete) Fix static type dispatch by mistake due to typo (#42260) (#43488)
### What problem does this PR solve?

Problem Summary:

DeletePredicatePB should be DeleteSubPredicatePB.

Test case is too ambiguous to add, since this bug is triggered by a huge
random test and failed to find the minimal case. However, this fix is
verified under the wild test that it does works.

Note that this problem may be triggered by another bug, cuz schema in
delete predicate rowset should contain column referred in delete
condition. Even if we don't have this fix, this error should never
happend.

But this error occurred under wild tests, means that schema in delete
predicate rowset is not adaptable with delete condition. I think it is
under some status that delete operation use BE tablet schema rather than
schema from FE, and the former rename operation result in that status.
But I failed to add a test case to reproduce, and think that by no way
will it happend occurding to the related code.
```
(1105, 'errCode = 2, detailMessage = ([172.20.50.7](http://172.20.50.7/))[INTERNAL_ERROR]failed to initialize storage reader. tablet=78026, res=[INTERNAL_ERROR]column not found, name=loc1, table_id=-1, schema_version=2

\t0#  doris::TabletSchema::column(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const at /home/zcp/repo_center/doris_master/doris/be/src/common/status.h:375
\t1#  doris::Status doris::DeleteHandler::_parse_column_pred<doris::DeleteSubPredicatePB>(std::shared_ptr<doris::TabletSchema>, std::shared_ptr<doris::TabletSchema>, google::protobuf::RepeatedPtrField<doris::DeleteSubPredicatePB> const&, doris::DeleteConditions*) at /home/zcp/repo_center/doris_master/doris/be/src/util/expected.hpp:1986
\t2#  doris::DeleteHandler::init(std::shared_ptr<doris::TabletSchema>, std::vector<std::shared_ptr<doris::RowsetMeta>, std::allocator<std::shared_ptr<doris::RowsetMeta> > > const&, long) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701
\t3#  doris::TabletReader::_init_delete_condition(doris::TabletReader::ReaderParams const&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701
\t4#  doris::TabletReader::_init_params(doris::TabletReader::ReaderParams const&) at /home/zcp/repo_center/doris_master/doris/be/src/common/status.h:499
\t5#  doris::TabletReader::init(doris::TabletReader::ReaderParams const&) at /home/zcp/repo_center/doris_master/doris/be/src/common/status.h:499
\t6#  doris::vectorized::BlockReader::init(doris::TabletReader::ReaderParams const&) at /home/zcp/repo_center/doris_master/doris/be/src/common/status.h:499
\t7#  doris::vectorized::NewOlapScanner::open(doris::RuntimeState*) at /home/zcp/repo_center/doris_master/doris/be/src/common/status.h:499
\t8#  doris::vectorized::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::ScanTask>) at /home/zcp/repo_center/doris_master/doris/be/src/common/status.h:388
\t9#  std::_Function_handler<void (), doris::vectorized::ScannerScheduler::submit(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::ScanTask>)::$_1::operator()() const::{lambda()#1}>::_M_invoke(std::_Any_data const&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701
\t10# doris::ThreadPool::dispatch_thread() at /home/zcp/repo_center/doris_master/doris/be/src/util/threadpool.cpp:0
\t11# doris::Thread::supervise_thread(void*) at /var/local/ldb-toolchain/bin/../usr/include/pthread.h:562
\t12# ?
\t13# ?
, backend=[172.20.50.7](http://172.20.50.7/)')
```

```cpp
auto tablet_schema = std::make_shared<TabletSchema>();
    tablet_schema->copy_from(*tablet->tablet_schema());
    if (!request.columns_desc.empty() && request.columns_desc[0].col_unique_id >= 0) {
        tablet_schema->clear_columns();
        // TODO(lhy) handle variant
        for (const auto& column_desc : request.columns_desc) {
            tablet_schema->append_column(TabletColumn(column_desc));
        }
    }
    RowsetSharedPtr rowset_to_add;
    // writes
    res = _convert_v2(tablet, &rowset_to_add, tablet_schema, push_type);
    if (!res.ok()) {
        LOG(WARNING) << "fail to convert tmp file when realtime push. res=" << res
                     << ", failed to process realtime push."
                     << ", tablet=" << tablet->tablet_id()
                     << ", transaction_id=" << request.transaction_id;

        Status rollback_status = _engine.txn_manager()->rollback_txn(request.partition_id, *tablet,
                                                                     request.transaction_id);
        // has to check rollback status to ensure not delete a committed rowset
        if (rollback_status.ok()) {
            _engine.add_unused_rowset(rowset_to_add);
        }
        return res;
    }

    // add pending data to tablet

    if (push_type == PushType::PUSH_FOR_DELETE) {
        rowset_to_add->rowset_meta()->set_delete_predicate(std::move(del_preds.front()));
        del_preds.pop();
    }
```
2024-11-11 17:44:20 +08:00
95d27cf6b2 [Opt](exec) change transmit block to rw lock to opt performance #43223 (#43492)
cherry pick #43223 

Co-authored-by: HappenLee <happenlee@selectdb.com>
2024-11-11 17:32:09 +08:00
5939200076 [Impl](Nereids) add propagateNullLiteral trait for special functions (#42256) (#43491)
pick: #42256

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [x] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->

Co-authored-by: LiBinfeng <libinfeng@selectdb.com>
2024-11-11 16:22:41 +08:00
5dda61b410 [fix](backup) Load backup meta and job info bytes from disk #43276 (#43519)
cherry pick from #43276
2024-11-11 14:08:35 +08:00
e073b575cc [Opt](TabletSchema) reuse TabletColumn info to reduce mem (#42448) (#43349)
(#42448)
2024-11-11 10:38:42 +08:00
ebe6b4d4db [Opt](Serde) optimize serialization to string on variant type (#43237) (#43342)
(#43237)
2024-11-11 10:35:30 +08:00
138103f9eb [opt](arm)Remove negative optimizations of SSE2NEON on memcmp for ARM… (#43510)
… (#38759)
https://github.com/apache/doris/pull/38759
The main issue is that _mm_movemask_epi8 does not have a one-to-one
corresponding instruction on ARM. Testing shows that it performs worse
compared to using memcmp, which allows the compiler to generate the
corresponding ARM instructions.
The following tests were conducted on ARM.
```
--------------------------------------------------------------
Benchmark                    Time             CPU   Iterations
--------------------------------------------------------------
BM_memequal16_sse         3.77 ns         3.77 ns    743238946
BM_memequal16_orgin       2.11 ns         2.11 ns   1000000000
```
2024-11-10 21:20:46 +08:00
91eb8f8365 branch-2.1: [chore](log) Use correct error type of uneven user behaviour (#43494)
Cherry-picked from #43334

Co-authored-by: zclllhhjj <zhaochangle@selectdb.com>
2024-11-10 21:12:35 +08:00
b9e5d878fc [refine](bits) refine bytes_mask_to_bits_mask code (#38360) (#43511)
https://github.com/apache/doris/pull/38360
The previous code only considered the x86 architecture, and
_mm_movemask_epi8 does not have a corresponding instruction in ARM.
According to the article below, we need to abstract the overall logic.
For ARM, optimize using the content mentioned in the following article:
filter function origin 0.711375 seconds 0.7154 seconds 0.71782 seconds
0.715296 seconds
filter function arm opt 0.559854 seconds 0.559854 seconds 0.559854
seconds 0.559854 seconds
2024-11-10 21:06:39 +08:00
72b1e2a346 [fix](Outfile) forbid parallel outfile if pipeline engine enabled. (#43437)
Because pipeline engine doesn't implement parallel outfile, we should
forbid the parallel outfile if pipeline engine enabled.
2024-11-10 18:29:08 +08:00
8867a826bc [opt](arm) Optimize the BlockBloomFilter::bucket_find on ARM platform… (#43508)
…s using NEON instructions. (#38888)
https://github.com/apache/doris/pull/38888
## Proposed changes

```
--------------------------------------------------------------
Benchmark                    Time             CPU   Iterations
--------------------------------------------------------------
BM_BucketFindNeon         8.14 ns         8.14 ns    344002441
BM_BucketFindNative       17.5 ns         17.5 ns    160152491
```
2024-11-10 18:23:58 +08:00
4c7e495392 [cherry-pick](branch-2.1) fix wrong property of S3 resource (#43413) 2024-11-10 18:17:51 +08:00
5ac3aee460 branch-2.1: [opt](max-compute) avoid repeated location path creation (#43383)
Cherry-picked from #43355

Co-authored-by: Mingyu Chen (Rayner) <morningman@163.com>
2024-11-10 10:11:37 +08:00
182f37f837 [fix](planner) NullLiteral should always having a correct Type and set to be analyzed (#43371) 2024-11-10 10:10:40 +08:00
1d740ff825 [fix](auditlog) set isQuery to true when query is short circuited (#42647) (#43345)
(#42647)
2024-11-10 10:08:56 +08:00
ea67e3a6b4 branch-2.1: [enhance](mtmv)MTMV interface optimization (#43329)
Cherry-picked from #43086

Co-authored-by: zhangdong <493738387@qq.com>
2024-11-10 10:07:35 +08:00
80fd76677e branch-2.1: [Improvement](LDAP Auth)Enhance LDAP authentication with a configurable group filter (#43293)
Cherry-picked from #42038

Co-authored-by: nsivarajan <117266407+nsivarajan@users.noreply.github.com>
Co-authored-by: Sivarajan Narayanan <narayanan_sivarajan@apple.com>
2024-11-10 10:06:13 +08:00
fe1b8d44fd branch-2.1: [fix](mtmv)Fix the problem where the job does not exist, which prevents the deletion of MTMV (#43325)
Cherry-picked from #43080

Co-authored-by: zhangdong <493738387@qq.com>
2024-11-10 01:11:26 +08:00
625a1ea6ad branch-2.1: [Optimize](Expr) Opt getting value of VLitreal (#43249)
Cherry-picked from #43204

Co-authored-by: zclllhhjj <zhaochangle@selectdb.com>
2024-11-10 01:03:56 +08:00
fba06b33b9 [cherry-pick](branch-2.1)add SessionVariable for enableCooldownReplicaAffinity (#42675)
pick from master:https://github.com/apache/doris/pull/41741
2024-11-10 00:46:26 +08:00
486dfe9f42 branch-2.1: [fix](auth)Fix concurrency issue during role manager upgrade (#43194)
Cherry-picked from #42419

Co-authored-by: zhangdong <493738387@qq.com>
2024-11-10 00:45:07 +08:00
e8d4c4cb7a branch-2.1: [fix](regression) fix flaky partial update cases (#43143)
Cherry-picked from #42908

Co-authored-by: zhannngchen <48427519+zhannngchen@users.noreply.github.com>
2024-11-10 00:37:33 +08:00
d933956449 [branch-2.1](timezone) Preload time offset in datetime (#42395) (#42607)
pick https://github.com/apache/doris/pull/42395
2024-11-10 00:30:28 +08:00
5195d61b6f [fix](profile) update_rpc_time when enable_verbose_profile = false (#43096)
### What problem does this PR solve?

If enable_verbose_profile is false, update_rpc_time will not be called,
and RPC count, max, and min statistics will not be recorded.

```
                          -  RpcCount:  0
                          -  RpcMaxTime:  0ns
                          -  RpcMinTime:  0ns
                          -  RpcSumTime:  0ns
```



Co-authored-by: Mryange <yanxuecheng@selectdb.com>
2024-11-09 22:17:29 +08:00
9d7bc5b765 [pick](branch-2.1) pick #38215 (#43386)
pick #38215

---------

Co-authored-by: Zou Xinyi <zouxinyi@selectdb.com>
2024-11-09 22:13:05 +08:00
fefc8a8efb branch-2.1: [fix](new_json_reader)fix new_json_reader core (#43188)
Cherry-picked from #41290

Co-authored-by: amory <wangqiannan@selectdb.com>
2024-11-09 12:33:34 +08:00
95cfe72f61 [test](p0) fix load stream leak in injection cases (#42681) (#43505)
cherry-pick #42681
2024-11-08 21:36:13 +08:00
2ba88ed2a8 [improve](report) split agent batch tasks automaticlly #43257 (#43365)
cherry pick from #43257
2024-11-08 18:59:53 +08:00
8f2f4e9394 [feature](binlog) Wrap rename table/column binlog in BarrierLog #43033 (#43168)
cherry pick from #43033
2024-11-08 18:59:25 +08:00
57c794ba77 [fix](backup) Fix compressed backup job #43197 (#43484)
cherry pick from #43197
2024-11-08 16:16:09 +08:00
2e8753b0cd [fix](restore) Add synchronized to avoid concurrent modification #43172 (#43486)
cherry pick from #43172
2024-11-08 15:51:17 +08:00
31480d11d7 [improve](task) Support splitting agent batch tasks automatically #42703 (#43483)
cherry pick from #42703
2024-11-08 15:51:04 +08:00
80de533b7c [improve](backup) Only compress the running backup/restore job #43177 #43278 (#43487)
cherry pick from #43278
2024-11-08 14:10:53 +08:00
69eb02b96f [chore](restore) Save restore stmt to the resp if RestoreSnapshot failed #42933 (#42985)
cherry pick from #42933
2024-11-08 14:05:50 +08:00
031ee992e7 [feature](binlog) Allow BarrierLog to wrap another binlog #42993 (#43485)
cherry pick from #42993
2024-11-08 14:04:54 +08:00
1b6d47d351 [fix](task) Abort creating replica task if sending RPC failed #42276 (#42963)
cherry pick from #42276
2024-11-08 10:44:27 +08:00
6006907c79 [improve](restore) Compress backup/restore job log size by compress (#42463)
ref #42459
2024-11-08 10:43:14 +08:00
90da65c7b8 [fix](block-reader) Make rowsets union iterating work (#40877) (#43175)
pick: #40877
2024-11-08 10:05:10 +08:00
1ac00ea983 branch-2.1: [feat](doris compose) Copy lastest compose code from master branch (#43464)
Copy lastest code from master branch to support run docker suites
without external doris cluster, enable jvm debug port, ..., etc.
2024-11-08 09:47:19 +08:00
f6ddd818cd [tests](inverted index)Add and improve add/drop index cases (#36811) (#43463)
bp #36811
2024-11-08 09:38:54 +08:00
7de7541ec6 branch-2.1: [fix](ES Catalog)Only like on keyword can be applied to wildcard query (#43400)
Cherry-picked from #41176

Co-authored-by: qiye <jianliang5669@gmail.com>
2024-11-07 22:43:42 +08:00
12bb38eab3 [fix](build index)Fix build index failed on renamed column (#42882)(#43246)(#43336) (#43266)
bp #42882 #43246 #43336
We pick these PRs together because they all fix one problem and if not
do so, the regression test won't be passed.

---------

Co-authored-by: Sun Chenyang <csun5285@gmail.com>
Co-authored-by: qidaye <luen@selectdb.com>
2024-11-07 21:32:02 +08:00
c3e6702d28 branch-2.1: [fix](array-funcs)fix array funcs which ret can be nullable (#43354)
Cherry-picked from #43243

Co-authored-by: amory <wangqiannan@selectdb.com>
2024-11-07 18:28:50 +08:00
bbfed507da [fix](schema-change) Make sc job state updated after the table state is changed (#42670) (#43186)
pick: #42670
2024-11-07 14:07:24 +08:00
443e87e203 2.1.7-rc03 (#43338)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2024-11-06 15:21:23 +08:00
8fedb03fdc branch-2.1: [fix](auth)Fix after fe restarting, external permissions are lost (#43307)
Cherry-picked from #43275

Co-authored-by: zhangdong <493738387@qq.com>
2024-11-06 14:54:59 +08:00
876fae6f71 [fix](regression) test_primary_key_partial_update fail due to the U.S. change from DST to standard time (#43288) (#43300)
cherry-pick #43288
2024-11-06 14:10:29 +08:00
9d5ebd6f34 [fix](export) make sure the export task being executed after writing "create export job" edit log #43250 (#43291)
cherry-pick #43250
2024-11-06 09:47:14 +08:00
0efca04183 2.1.7-rc02 (#43285)
### What problem does this PR solve?
<!--
You need to clearly describe your PR in this part:

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 this function was added.
4. Which codes were refactored and why this part of the code was
refactored.
5. Which functions were optimized and what is the difference before and
after the optimization.

The description of the PR needs to enable reviewers to quickly and
clearly understand the logic of the code modification.
-->

<!--
If there are related issues, please fill in the issue number.
- If you want the issue to be closed after the PR is merged, please use
"close #12345". Otherwise, use "ref #12345"
-->
Issue Number: close #xxx

<!--
If this PR is followup a preivous PR, for example, fix the bug that
introduced by a related PR,
link the PR here
-->
Related PR: #xxx

Problem Summary:

### Check List (For Committer)

- Test <!-- At least one of them must be included. -->

    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No colde files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:

    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?

    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

- Release note

    <!-- bugfix, feat, behavior changed need a release note -->
    <!-- Add one line release note for this PR. -->
    None

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->

Co-authored-by: yiguolei <yiguolei@gmail.com>
2024-11-05 20:17:25 +08:00