Commit Graph

9103 Commits

Author SHA1 Message Date
dca16796ad [fix](ParquetReader) definition level of repeated parent is wrong (#17337)
Fix three bugs:
1.  `repeated_parent_def_level ` should be the definition of its repeated parent.
2. Failed to parse schema like `decimal(p, s)`
3. Fill wrong offsets for array type
2023-03-06 18:15:57 +08:00
843b4b5746 [fix](regression) Adjust the test_add_drop_index case to avoid that FE failed to start when replaying the log (#17425)
This pr is a temporary circumvention fix.

In regression case `inverted_index_p0/test_add_drop_index.groovy`, both bitmap index and inverted index are created 
on the same table, when create or drop bitmap index will change table's state to `SCHEMA_CHANGE`, create or drop
 inverted index not change the table's state.
Before do create or drop inverted index check the table's state whether is `NORMAL` or not, Because of replay log for 
'bitmap index' has change table state, and it didn't finish soon lead to table's state not change back to `NORMAL`, then
 replay log for 'inverted index' failed, FE start failed.
2023-03-06 17:39:12 +08:00
9477c48ef8 [refactor](functioncontext) remove duplicate type definition in function context (#17421)
remove duplicate type definition in function context
remove unused method in function context
not need stale state in vexpr context because vexpr is stateless and function context saves state and they are cloned.
remove useless slot_size in all tuple or slot descriptor.
remove doris_udf namespace, it is useless.
remove some unused macro definitions.
init v_conjuncts in vscanner, not need write the same code in every scanner.
using unique ptr to manage function context since it could only belong to a single expr context.
Issue Number: close #xxx
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-06 16:07:09 +08:00
e7cba11680 [fix](array)(parquet) fix be core dump due to load from parquet file containing array types (#17298) 2023-03-06 15:18:42 +08:00
02015cf153 [docs](typo) Correct the wrong default value of DECIMAL type displayed in the Help CREATE TABLE #17422
Correct the wrong default value of DECIMAL type displayed in the Help CREATE TABLE
2023-03-06 12:50:30 +08:00
bc5f16dc80 [deps](libhdfs) add official hadoop libhdfs for x86 (#17435)
This is the first step to introduce official hadoop libhdfs to Doris.
Because the current hdfs client libhdfs3 lacks some important feature and is hard to maintain.

Download the hadoop 3.3.4 binary from hadoop website: https://hadoop.apache.org/releases.html
Extract libs and headers which are used for libhdfs, and pack them into hadoop_lib_3.3.4-x86.tar.gz
Upload it to https://github.com/apache/doris-thirdparty/releases/tag/hadoop-libs-3.3.4

TODO:
The hadoop libs for arm is missing, we need to find a way to build it
2023-03-06 12:47:53 +08:00
8e6c34dd11 [Opt](Vec) Use const_col to opt current functions. (#17324) 2023-03-06 11:55:41 +08:00
0ad638f9fe [enhancement](transaction) Reduce hold writeLock time for DatabaseTransactionMgr to clear transaction (#17414)
* [enhancement](transaction) Reduce hold writeLock time for DatabaseTransactionMgr to clear transaction

* fix ut

* remove unnessary field for remove txn bdbje log

---------

Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-03-06 11:32:21 +08:00
9617f46fa5 [improvement](memory) Modify mem_limit default value (#17322)
Modify the default value of mem_limit to auto. auto means process mem limit is equal to max(physical mem * 0.9, 6.4G).
6.4G is the maximum memory reserved for the system.
2023-03-06 10:53:27 +08:00
400b4bf7a7 [enhance](report) add local and remote size in tablet meta header action (#17406) 2023-03-06 10:43:57 +08:00
ee1be6edd7 [chore](fe) enhance_mysql_data_type (#17429) 2023-03-06 10:42:01 +08:00
155cbffe62 [fix](regression) Parameterize the S3 info for segcompaction regression (#16731) (#17391)
Use regression conf instead hard-coded S3 info.

Signed-off-by: freemandealer <freeman.zhang1992@gmail.com>
2023-03-06 10:33:22 +08:00
56a3ead2d7 [Improvement](restore) make timeout of restore job's dispatching task progress configuable (#17434)
when a restore job which has a plenty of replicas, it may fail due to timeout. The error message is:
[RestoreJob.checkAndPrepareMeta():782] begin to send create replica tasks to BE for restore. total 381344 tasks. timeout: 600000

Currently, the max value of timeout is fixed, it's not suitable for such cases.
2023-03-06 10:05:31 +08:00
a8f20eb4ac [Enhencement](schema_scanner) Optimize the performance of reading information schema tables (#17371)
batch fill block
batch call rpc from FE to get table desc
For 34w colunms

SELECT COUNT( * ) FROM information_schema.columns;
time: 10.3s --> 0.4s
2023-03-06 09:53:01 +08:00
3d0beec01d [fix](orc) fix heap-use-after-free and potential memory leak of orc reader (#17431)
fix heap-use-after-free
The OrcReader has a internal FileInputStream, If the file is empty, the memory of FileInputStream will leak.
Besides, there is a Statistics instance in FileInputStream. FileInputStream maybe delete if the orc reader
is inited failed, but Statistics maybe used when orc reader is closed, causing heap-use-after-free error.

Potential memory leak
When init file scanner in file scan node, the file scanner prepare failed, the memory of file scanner will leak.
2023-03-06 08:42:35 +08:00
0801883604 [fix](merge-on-write) fix that delete bitmap is not calculated correctly when clone tablet (#17334) 2023-03-05 22:04:28 +08:00
5190a496ac [fix](rebalance) fix that the clone operation is not performed due to incorrect condition judgment (#17381) 2023-03-05 21:58:33 +08:00
d8a231f340 [Improvement](auth)(step-2) add ranger authorizer for hms catalog (#17424) 2023-03-05 21:50:44 +08:00
d08b231073 [fix](segcompaction) core when doing segcompaction for cancelling load(#16731) (#17432)
segcompaction is async and in parallel with load job. If the load job is
canncelling, memory structures will be destroyed and cause segcompaction
crash. This commit will wait segcompaction finished before destruction.
2023-03-05 21:24:32 +08:00
779d94f932 [fix](metrics)Delete the extra underline for metrics (#17397) 2023-03-05 16:38:43 +08:00
afb5def385 [enhancement](timeout) replace query timeout with exec timeout (#17360) 2023-03-05 11:03:59 +08:00
59bf305c5d [Improve](point query) put tablet fetch interface which is high concurrent point query operation to light_work_pool (#17400)
Since the point query lookup is very light weight
2023-03-05 10:36:50 +08:00
627b5ee302 [enhancement](k8s) Support fqdn mode for fe in k8s enviroment (#17329) 2023-03-05 10:18:56 +08:00
7b4fc412c5 [typo](docs) Optimize documents so that users can better understand. (#17295) 2023-03-04 21:02:45 +08:00
b9b028099d [enhancement](stream load pipe) using queryid or load id to identify stream load pipe instead of fragment instance id (#17362)
* [enhancement](stream load pipe) using queryid or load id to identify stream load pipe instead of fragment instance id

NewLoadStreamMgr already has pipe and other info. Do not need save the pipe into fragment state. and FragmentState should be more clear.

But this pr will change the behaviour of BE.
I will pick the pr to doris 1.2.3 and add the load id to FE support. The user could upgrade from 1.2.3 to 2.x
Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-04 16:19:36 +08:00
2b014a0464 [Improve](doris::Status performance) fix the performance issue due to copy of std::string (#17411) 2023-03-04 15:08:59 +08:00
82df2ae9d8 [feature](mysql) Support secure MySQL connection to FE (#17138)
Background:
Doris currently does not support SSL connection from MySQL clients, it's not secure enough in some cases, especially access Doris via the public internet.

Solution:
- Use TLS1.2 protocol to encrypt information.
- Implementation details
  * server <--- connect <--- client
  * if enable SSL: {
  * server <--- SSL connection request packet <--- client
  * server <--- SSL Exchange ---> client } (we will add this `if` logic part in this PR)
  * server ---> handshake request packet ---> client
  * server <--- encrypted data ---> client (this part will be realized in this PR)
- reference1 https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase.html#sect_protocol_connection_phase_initial_handshake_ssl_handshake
- reference2 https://www.rfc-editor.org/rfc/rfc5246

close #16313

Signed-off-by: Yukang Lian <yukang.lian2022@gmail.com>
Co-authored-by: Gavin Chou <gavineaglechou@gmail.com>
Co-authored-by: morningman <morningman@163.com>
2023-03-04 12:14:48 +08:00
9f7386243f [Fix](regression-test)fix some unfixed-answer test #17408 2023-03-04 12:13:41 +08:00
9aecd517b0 [test](Nereids) turn on all test in scalar function w (#17269)
turn on all test case in scalar function W except width_bucket(fix be bug in next PR)
turn off all test case for group_concat(distinct order by)
fix return nullable in TimestampArithmetic
2023-03-04 08:23:50 +08:00
c9179bd155 [chore](workflow) Fix the workflow BE UT (macOS) (#17403)
#17292 enabled detect_container_overflow which made the workflow BE UT (macOS) fail.
2023-03-03 23:34:54 +08:00
b501a9e7ab [improvement](inverted index)use reference to avoid bitmap copy for performance (#17352)
Query runtime is reduced from 10s to 1s for a MATCH query that match 40 million rows out of 44 million rows.
2023-03-03 21:00:49 +08:00
eea0cbec74 [enhancement](transaction) Reduce hold writeLock time for DatabaseTransactionMgr to improve stability of stream load (#17380)
Clear transaction state log occupies too much time, so we change clear transaction log level from info to debug


Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-03-03 19:06:39 +08:00
5c265d8183 [fix](vec)crashing caused by parallel output file (#17384) 2023-03-03 19:03:53 +08:00
9f97cd029f [Feature] (Nereids) add check to disable unsupported type (#17196)
1. disable decimalv3
2. disable json
3. disable complex type: array, map, struct
4. disable switch: group_by_and_having_use_alias
2023-03-03 17:57:48 +08:00
17164cf7a8 [fix](docs) add logic for batch delete when sequence column exists (#17367)
* [fix](docs) add logic for batch delete when sequence column exists.

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

* add docs

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

* fix docs 2

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-03 16:28:31 +08:00
0fada66e03 [fix](cooldown) Fix deadlock in tablet clone (#17252) 2023-03-03 15:53:12 +08:00
b5b595519a [fix](log) use logger to replace printStackTrace() (#17382)
Use Logger to replace printStackTrace to better locate problems.
2023-03-03 14:51:30 +08:00
cc5fa509ad [fix](cooldown) Fix bug in concurrent update_cooldown_conf and operations that update cooldowned data (#17086) 2023-03-03 14:36:58 +08:00
Pxl
ae689c3a0b [Bug](regression-test) remove some exception title on regression case (#17374)
remove some exception title on regression case
2023-03-03 14:18:10 +08:00
3b94ca5ceb [chore](macOS) Use LLVM Clang by default (#17292)
Use LLVM Clang by default
2023-03-03 14:18:02 +08:00
6ce8200d9e [doc](typo) external-table-load.md (#17234)
* fix: external-table-load.md

The SQL with a syntax error.

* fix: external-table-load.md (Chinese)

The SQL with a syntax error.
2023-03-03 14:11:19 +08:00
11994b76d7 add the tag <version since="dev"> for insert_timeout. (#17316)
Co-authored-by: smallhibiscus <844981280>
2023-03-03 14:10:49 +08:00
ba108d40d8 [docs](link) Fix some links in docs is broken (#17335)
* [docs](link) Fix some links in docs is broken

* fix_typo
2023-03-03 14:08:05 +08:00
f5d958ccf9 [fix](MTMV) Reset insert timeout in handleInsert (#17249)
In #16343, we split the timeout variable into two ones (one is for query and another is for insertion).

The function `ConnectProcessor::handleQuery` uses the corresponding session variable to change the timeout for the queries requested by MySQL client. However, the function `StmtExecutor::handleInsert` doesn't use the session variable to change the timeout, so we can't change the timeout for the CTAS and MTMV insertion job.
2023-03-03 11:32:50 +08:00
c96571c236 [Bug](decimalv2) decimal value is filtered by mistake (#17353)
Reason: column_name[k5], decimal value is not valid for definition, value=123.123, precision=9, scale=3, min=-999999.999, max=-999999.999; . src line [];

#17273
2023-03-03 10:40:19 +08:00
e82b827bc8 [optimize](vectorization)Optimize to_string's performance. (#17076) 2023-03-03 10:35:59 +08:00
94e9a226a6 [Bug](Block compression) Fix bug if config::compress_rowbatches=false then the block column values could be empty (#17325) 2023-03-03 10:31:12 +08:00
f5232e5c01 [vectorized](bug) fix some open enable_fold_constant_by_be failed cases (#17240) 2023-03-03 10:30:20 +08:00
449f2953c9 [Improvement](auth)(step-1) add ranger authorizer for hms catalog (#17153) 2023-03-03 09:45:08 +08:00
227d2b0bf9 [log](schema change) add schema change type log (#17349) 2023-03-03 08:25:28 +08:00