Commit Graph

2662 Commits

Author SHA1 Message Date
2ddf537094 [Meta] Add some consistency check in image put api (#5219) 2021-01-23 21:08:04 +08:00
a5298d617d [Performance Improve] Push Down _conjunctf of 'not in' and '!=' to Storage Engine. (#5207) 2021-01-23 21:07:01 +08:00
93a4c7efc1 [LOG] Standardize the use of VLOG in code (#5264)
At present, the application of vlog in the code is quite confusing.
It is inherited from impala VLOG_XX format, and there is also VLOG(number) format.
VLOG(number) format does not have a unified specification, so this pr standardizes the use of VLOG
2021-01-21 12:09:09 +08:00
50ba5d336d [Bug] Colocate Join and Bucket shuffle join may scan some tablet twice time. (#5256)
Fix issue #5255
2021-01-20 21:42:04 +08:00
b25bcee5d3 [Bug] Remove schema hash and fix bug of calculating table signature (#5254)
1. Schema hash is useless long time ago
    Currently, schema hash can only be generated as a random integer, no need to calculated
    from real schema.

2. The CRC32 algo is not enough to generate the table' signature.
    Table's signature is used to determine whether the tables have the same schema.
    And current CRC32 algo may return same signature even if table's schema are different.

    So I change it to calculate the md5 of a signature string assembled by schema info of a table.
2021-01-20 21:38:06 +08:00
83b7a23d5c fix alter routine load not work (#5257) 2021-01-20 10:52:02 +08:00
3a6476b37b add as sdk to thirdparty (#5234) 2021-01-20 10:51:22 +08:00
a59831d119 [Bug] Fix fe restart failed bug when replay erase table log (#5221)
Co-authored-by: gengjun <gengjun@dorisdb.com>
2021-01-19 10:25:49 +08:00
64b3660be2 [UT] fix the bug of getting current running dir (#5193)
Fixed the logic after `readlink`, add a test_util function `GetCurrentRunningDir()`.
2021-01-19 10:23:50 +08:00
73a67901ed [Metric] Add system memory metrics for fe (#5149)
Currently, fe's SystemMetrics only support tcp. I add system memory metrics for fe.
Then we can get system memory metrics , which is used to troubleshoot memory problems.
2021-01-17 09:37:01 +08:00
6794dd08bd [Doc] Update PULL_REQUEST_TEMPLATE.md (#5248)
A reword suggestion. 
Reasons: Before my change, the statement is "If this change need a document change, I have updated the document", 
and there is a grammar error in it evidently: "change" cannot be paired with "need".
Either "changes need" or "change need" will be ok at the grammar level.
According to the context, "changes need" will be better. 
Now, the statement is "If these changes need document changes, I have updated the document".
2021-01-16 21:38:38 +08:00
3dcbbbea95 [Enhancement] Fill assignment param of bucket shuffle and colocate shuffle for debug (#5167)
When Doris is in debug mode, function `Coordinator#traceInstance` is used to print
the physical execute plan of a fragment instance for debug.
Function  `Coordinator#traceInstance` uses param `scanRangeAssignment` to print
the detail of a fragment. But bucket shuffle join and colocate shuffle join do not fill the param.
That will cause debug not work well.
This path fill assignment param of bucket shuffle and colocate shuffle for debug.
2021-01-16 21:37:33 +08:00
99b22c92f8 [Feature] Add a http interface for single tablet migration between different disks (#5101)
Based on PR #4475, this patch add a new feature for single tablet migration between different disks by http.
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-01-16 21:35:20 +08:00
d692764934 [Optimize]Take all scan nodes of one sql into consideration when select host for a tablet (#4984)
Currently when a scan node scans many tablets, Doris will assure it load balance when choosing which replica for scan task to be executed. But it does not take other scan nodes into consideration to implement a global load balance. This patch tries to make all tables of all scan nodes to be load balance.

Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2021-01-15 11:18:57 +08:00
78fd4b68f8 [Bug] Fix bucket shuffle join bug of query failed (#5228)
Fix #5227:Fix bug query failed when bucket cut in left table.
2021-01-15 10:44:04 +08:00
35bb099b8b [Doc] Update README.md: a reword suggestion (#5241) 2021-01-15 10:43:07 +08:00
20c10fae2e Update README.md (#5239) 2021-01-15 10:42:42 +08:00
449ba1e321 Update PULL_REQUEST_TEMPLATE.md (#5240) 2021-01-15 10:42:10 +08:00
81265f7d63 Update README.md (#5236)
This is a basic grammatical modification suggestion, which will not break any existing build.
2021-01-15 10:39:34 +08:00
78b84594e6 [Feature] Support Create Dynamic Partition Immediately FirstTime Without Wating Schedule. (#5209) 2021-01-15 09:46:44 +08:00
58e58c94d8 [TSAN] Fix tsan bugs (part 1) (#5162)
ThreadSanitizer, aka TSAN, is a useful tool to detect multi-thread
problems, such as data race, mutex problems, etc.
We should detect TSAN problems for Doris BE, both unit tests and
server should pass through TSAN mode, to make Doris more robustness.
This is the very beginning patch to fix TSAN problems, and some
difficult problems are suppressed in file 'tsan_suppressions', you
can suppress these problems by setting:
export TSAN_OPTIONS="suppressions=tsan_suppressions"

before running:
`BUILD_TYPE=tsan ./run-be-ut.sh --run`
2021-01-15 09:45:11 +08:00
07eaf50084 [Feature] Add a http interface to acquire the tablets distribution between different disks (#5096)
For the task of rebalancing tablet among different disks on the same BE,
It might be an effective strategy to ensure all tablets under the same partition
evenly distribute on the different disks. Thus, it is necessary to obtain the
distribution of tablets under the same partition between different disks on a BE.

This patch add a new http interface for BE to acquire the distribution of tablets
under a partition between different disks on the same BE.
2021-01-15 09:32:27 +08:00
f7730031b8 Support read and write lock in table level to reduce lock competition (#3775)
This PR is to reduce lock competition by supporting read and write lock in table level. When we modify or read table's meta, we don't need to get database lock, just get table write or read lock. And when we get database lock, that means meta directly in db cannot be modified by other thread. Database lock only protect meta in Database class, while table lock protect meta in Table class.

Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-01-13 10:27:58 +08:00
98d8e1d53b fix duplicated add delete condition (#5222) 2021-01-13 09:18:15 +08:00
851d45216e Fix daily test failed cause by delete condition (#5211)
* fix daily test failed
2021-01-12 10:54:44 +08:00
56d0cc3f54 [Spark on Doris] fix the encode of varchar when convertArrowToRowBatch (#5202)
`convertArrowToRowBatch` use the default charset to encode String.
Set it to UTF_8, because we use `arrow::utf8` on the Backends.
2021-01-10 20:48:46 +08:00
05631cfa4f [Config] Add publish timeout param when exec insert (#5170)
Add new session variable to control the timeout of publish task of insert operation.
2021-01-10 20:48:10 +08:00
f2a11fe1f7 [Enhancement] Add more comprehensive prometheus jvm thread metrics on fe (#5112)
Currently, fe thread metrics is very simple, only have thread count and peak_count.
I think we may need more comprehensive prometheus jvm thread metrics on fe.
This will be useful when we want to analysis fe's running status.
2021-01-10 20:43:17 +08:00
5d6a1a7290 [Load] support ignoring eovercrowded when tablet sink (#5156)
If adding the ignore_eovercrowded flag, the `PTabletWriterAddBatchRequest`
won't failed on `EOVERCROWDED` to avoid load jobs failed in this error.
It only effects the NodeChannel(the load job), other rpc requests will still check if overcrowded.
2021-01-09 23:40:51 +08:00
65d33cf43c [Function] Add timeout of connection when downloading the function objectFile from URL (#5135)
Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-01-06 22:43:52 +08:00
1035e86e0b [Enhancement] Optimize the algorithm of selecting host for a bucket scan task when a backend not alive (#5133) 2021-01-06 10:20:16 +08:00
fe1ca824cc [Config] change some static config to dynamic config and delete some unused config (#5158)
* change some BE static config to dynamic config

Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-01-06 09:55:09 +08:00
1be429600b Update install-deploy.md (#5190)
update description about expanding FE
2021-01-05 09:49:15 +08:00
03e36056eb [Bug] Fix bug that the min/max function has an error in handling string null values. (#5189)
null should be ignored in min/max function.
And if there is no data, null should be return.

Co-authored-by: morningman <chenmingyu@baidu.com>
2021-01-05 09:48:38 +08:00
dd5f8f2a0f Fix compile error after rebase #5179 (#5191)
* fix rebase error
2021-01-05 09:16:15 +08:00
e536823f92 [Thirdparty] Fix build thirdparty may be failed (#5187)
1. fix build thirdparty may be failed  in some os, because of default lib path is `lib` or`lib64` or `arrow` bulld failed by `brotil` and `zstd`
2. fix canot extract `.tar.bz2` file
2021-01-04 15:21:18 +08:00
bcf1091043 Fix MaterializedView select with CTE bug (#5165) 2021-01-04 13:42:29 +08:00
6c098e45fc [Optimize][Cache]Implementation of Separated Page Cache (#5008)
#4995
**Implementation of Separated Page Cache**
- Add config "index_page_cache_ratio" to set the ratio of capacity of index page cache
- Change the member of StoragePageCache to maintain two type of cache
- Change the interface of StoragePageCache for selecting type of cache
- Change the usage of page cache in read_and_decompress_page in page_io.cpp
  - add page type as argument
  - check if current page type is available in StoragePageCache (cover the situation of ratio == 0 or 1)
- Add type as argument in superior call of read_and_decompress_page
- Change Unit Test
2021-01-04 12:19:24 +08:00
feabdd22f9 [FE][Log] Add log for abort transaction. (#5168)
Currently there is no abort transaction related log. When troubleshooting transaction failure
related problems, we need to use some debug tools to find the failed transaction,
so we'd better add a log when abort transaction
2021-01-04 09:34:11 +08:00
d46b57fae4 [Thirdparty] Use the bundle source of zstd when build_arrow (#5179)
use bundle source of zstd & double-conversion, instead of system.
2021-01-04 09:33:40 +08:00
0d3564c2e1 [Feature] Implementation of histogram metric (#5148)
#5146
Add histogram metrics into util/metrics.h. The data structure of histogram is implemented in util/histogram.h,
which could also be used in other situations that in need of histogram. Unit tests added as well.
2021-01-04 09:32:46 +08:00
d5768cf7d9 [Bug] Fix create colocate table bug (#5139)
Fix #5138 
1. fix bug when create colocate table with empty partition.
2. put code groupName2Id.put(fullGroupName, groupId) to the end to avoid state inconsistent when exception thrown.
3. do not check backendsPerBucketSeq empty in replayAddTableToGroup(),
    cause backendsPerBucketSeq can be empty for colocate table with empty partition.
2021-01-04 09:32:05 +08:00
5807413ad0 [UT] Add ut for column predicate of comlumnblock (#5123)
Add ut for column predicate of ColumnBlock
2021-01-04 09:29:30 +08:00
17d939b789 [Bug] Fix scanner threads heap-use-after-free (#5111)
Scanner threads may be running and using the member vars of OlapScanNode,
when the OlapScanNode has already destroyed.

We can use `_running_thread` to be the last accessed member variable.
And `transfer_thread` need to wait for `_running_thread==0`.
After `transfer_thread` joined, `OlapScanNode::close()` can continue.
2021-01-04 09:28:51 +08:00
05ac7fcd4a [Function] Add BE udf bitmap_xor (#5098)
this function will return the xor result of inputs two bitmap .
2021-01-04 09:27:46 +08:00
a8b8c4760c [Doc] Fix some spelling mistakes and default value mistakes in document (#5180) 2021-01-03 15:45:56 +08:00
f2cf8d2c5e [Bug-Fix] Fix the bug of PERCENTILE_APPROX return error result nan and add PERCENTILE_APPROX UT (#5172) 2021-01-03 15:45:22 +08:00
9e19b6b133 [Performance Improve] Push Down _conjunct of 'A is NULL' and 'B is not NULL' to Storage Engine. (#5092)
This patch mainly do the following:
- Support #5086
- Refactor ColumnRangeValue to support contain null
2021-01-03 15:45:07 +08:00
44325ae850 [Bug-Fix] Bucket shuffle join executes failed when two tables have no data (#5145)
Bucket shuffle join is an algorithm of joining two tables. Left table is distributed by a column.
Right table sends the data to the left table for joining operation.
It reduces the network cost. But when two table is without any data. Bucket shuffle join will fail.

Related Issue: #5144
2020-12-31 09:49:35 +08:00
bebbc27a83 [Thirdparty] Fix the DataTables.zip download issue (#5128)
Modify the third-party library DataTables.zip download url from dt-1.10.22 to dt-1.10.23,
resolved the download failure issue.
2020-12-31 09:47:43 +08:00