Commit Graph

2683 Commits

Author SHA1 Message Date
4ffc61be32 fix apply condition to unique table value columns incorrectly (#5302) 2021-01-29 10:34:47 +08:00
6bd22bc573 [BackupAndRestore] Support backup and restore view and external odbc table (#5299)
[BackupAndRestore] Support backup and restore view and external odbc table

1. Support backup and restore view and odbc table. The syntax is the same as that of the backup and restore table.
2. If the table associated with the view does not exist in the snapshot,
   the view can still be backed up successfully, but the TableNotFound exception will be thrown when querying the view.
3. If the odbc table associated with the odbc resource, the odbc resource will be backuped and restored together.
4. If the same view, odbc table and resource already exists in the database, it will compare whether the metadata of snapshot is consistent.
   If it is inconsistent, the restoration will fail.
4. This pr also modified the json format of the backup information.
   A `new_backup_objects` object is added to the root node to store backup meta-information other than olap table,
   such as views and external tables.
   ```
   {
       "backup_objects": {},
       "new_backup_objects": {
           "view": [
               {"name": "view1", "id": "10001"}
           ],
           "odbc_table": [
               {"name":"xxx", xxx}
           ]
           "odbc_resources": [
               {"name": "bj_oracle"}
           ]
       }
   }
   ```
5. This pr changes the serialization and deserialization method of backup information
   from manual construction to automatic analysis by Gson tools.

Change-Id: I216469bf2a6484177185d8354dcca2dc19f653f3
2021-01-28 18:50:18 +08:00
e774314ffb Fix some problems related to thrift rpc when use nonblokcing IO model (#5117)
* Fix some problems related to thrift rpc when use nonblokcing IO model

Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-01-28 10:57:30 +08:00
54814a7260 [Auidt] Fix bug for that only the last statement can be audited when user send multi-statement (#5244)
Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-01-28 10:54:18 +08:00
67b0631257 [Enhancement] Fix bug for auditloader plugin that audit event cannot be processed in time (#5194)
* [Enhancement] Fix bug that audit event cannot be processed in time

Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-01-28 10:53:32 +08:00
ca10205137 [Function] Support show create function statement (#5197)
* [Function]Support show create function stmt

Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-01-28 10:52:37 +08:00
41ef9ccda9 (#5224)some little fix for spark load (#5233)
* (#5224)some little fix for spark load

* 1 use yyyy-MM-dd instead of YYYY-MM-DD
2 unify lower case for bitmap column name
2021-01-27 11:16:59 +08:00
c084276600 Revert "[Bug] Fix row_number and group by are inconsistent with 0 and -0 partition (#5226)" (#5297)
This reverts commit 34bfc429868a9a22481d209c24ccd50d85cc3c9f.
The hash algo may be overflow
2021-01-26 13:58:19 +08:00
92bcd2f9fa [Doc] Update README.md: a reword suggestion (#5288) 2021-01-26 09:14:08 +08:00
6729c3b226 [gitignore] Update .gitignore: remove a duplicate pattern (#5289) 2021-01-26 09:13:49 +08:00
2010d331d3 [Doc] Translate a Chinese statement which appears in English version doc (#5290) 2021-01-26 09:13:30 +08:00
8ee4c48f13 [Compile] fix compile error in gcc10 (#5294) 2021-01-26 09:13:11 +08:00
067abac342 [bug] fix bug of getBrokerDesc object is null (#5295)
Co-authored-by: wangxiaobaidu11 <328642799@qq.com>
2021-01-26 09:12:44 +08:00
3db08a14bf [Bug] Fix bug of outer join cause error result. (#5285)
issue: #5284
2021-01-24 10:14:26 +08:00
72ca5c5f3d [Optimize] Remove path check when start BE (#5268)
remove path check when start BE
2021-01-24 10:14:07 +08:00
139709d060 [Storage] Optimize Zone map create policy (#5260)
If there are too large fields in the table, there may be only one row in each page,
and this row also has a zone map index
This causes the stored data to expand three times the original data,
It also takes up more memory when reading those segments
Therefore, we need to Disable the creation of zonemap indexes for segments with too few rows
2021-01-24 10:11:21 +08:00
ab06e92021 [Load Parallel][2/3] Support parallel flushing memtable during load (#5163)
In the previous implementation, in an load job,
multiple memtables of the same tablet are written to disk sequentially.
In fact, multiple memtables can be written out of order in parallel,
only need to ensure that each memtable uses a different segment writer.
2021-01-24 10:10:30 +08:00
7e61400e3c [Load Parallel][1/3] Broker Load supports setting the load parallelism (#5277)
* [Load] Broker Load supports setting the load parallelism

Similar to the parallel_fragment_exec_instance_num parameter,
it allows the user to set the parallelism of the load execution plan
on a single node when the broker load is submitted.

eg:
```
...
properties (
"load_parallelism" = "4";
...
)
```

This parameter is currently only used to support the load parallelism setting,
but it cannot significantly improve the load speed for the time being.
The speed increase will be completed in subsequent code submissions.
Documents will also be added in subsequent submissions.

This PR also update the FE meta version.
2021-01-24 10:09:53 +08:00
1884c7b25d [Doc] Update README.md (#5287)
Target:
1. Make the statement more friendly.  
2. Substitute the word "environment" to its plural format "environments".
2021-01-23 21:10:30 +08:00
d3f1b49faa [Bug] Fix bug that recover table throw NPE (#5279) 2021-01-23 21:09:54 +08:00
34bfc42986 [Bug] Fix row_number and group by are inconsistent with 0 and -0 partition (#5226)
The essence of the problem is behavior of negative zero (- 0.0) in comparison with positive zero (+ 0.0).
Currently in GroupBy and HashPartition, -0.0 is not equal to 0.0 (result of Hash function),
so the -0.0 and 0.0 are divided into 2 partitions.

In row_number analytic function, for the sorted data, a new partition will be opened when the values ​​​​of
the upper and lower rows are not equal. But in C++ the comparison 0.0 == -0.0 is true, so 0.0 and -0.0
are divided into the same partition for row_number.

(Floating point arithmetic in C++ is often IEEE-754. This norm defines two different representations for
the value zero: positive zero and negative zero. It is also defined that those two representations must
compare equals. Refer to https://stackoverflow.com/questions/45795397)
2021-01-23 21:08:43 +08:00
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