Commit Graph

2726 Commits

Author SHA1 Message Date
204fa45a48 [FE][Bug] Fix overflow in RuntimeProfile.sortChildren. (#5377)
If the difference between the two times exceeds Integer.MAX_VALUE,
the compare's return value will overflow and the flow exception may be triggered when sorting profile.
2021-02-16 22:34:27 +08:00
bd72328177 [UT] Fix FE ut bugs (#5387)
This bug is introduced from #5356
2021-02-14 15:59:21 +08:00
b8612a4be5 [DOCS] add some missing documents (#5370) 2021-02-09 09:31:39 +08:00
51ccd44865 [Load Parallel][3/3] Support parallel delta writer (#5369)
In the previous broker load, multiple OlapTableSinks would send data to the same LoadChannel,
and because of the lock granularity problem, LoadChannel could only process these requests serially,
which made it impossible to make full use of cluster resources.

This CL modifies the related locks so that LoadChannel can process these requests in parallel.

In the test, with a size of 20G, the load speed of 334 million rows of data in 3 nodes has been
increased from 9min to 5min, and after enabling 2 concurrency, it can be increased to 3min.

Also modify the profile of load job.
2021-02-07 22:42:18 +08:00
f12f32da11 [Bug] Support if not exists in create table like stmt (#5368)
Currently we support syntax `create table xx if not exists like xxx`, but `if not exists` does not work well.
2021-02-07 22:41:55 +08:00
462efeaf39 [Performance Optimization and Refactor] (#5358) (#5364)
1. Add BlockColumnPredicate support OR and AND column predicate in RowBlockV2
2. Support evaluate vectorization delete predicate in storage engine not in Reader in SegmentV2
2021-02-07 22:41:33 +08:00
2ec55bf19e [LOG] Change some log level (#5361)
Change some log level from error to warn
2021-02-07 22:41:13 +08:00
6b0521032d [Bug] Fix the problem of floating point precision when importing parquet data (#5360)
The double data "4206.9" in parquet is converted to decimal data "4206.8999" in Doris,
which is not right.
2021-02-07 22:40:51 +08:00
f77b8ce8e4 [UT] Modify to avoid some UT failure accidentally (#5359)
After an Alter job finished, the job's state is FINISHED, but table's state
may not be NORMAL for a while.
We need to make sure that table's state become NORMAL to continue next UT.
2021-02-07 22:39:45 +08:00
a1808c1a71 [Function] Add BE udf bitmap_not (#5346) (#5357)
this function will return the not result of inputs two bitmap.
2021-02-07 22:39:17 +08:00
fd81499fbc [Bug] Add space in case and caseExpr when toSql (#5356) 2021-02-07 22:38:54 +08:00
aa5379cff5 [Doc] Modify cumulative_compaction_policy comment in config.h (#5354)
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-02-07 22:38:34 +08:00
8ad50bf745 [Bug] Fix bug that BE core will loading empty json array (#5349)
When loading json data like `[]` (an empty array). BE will crash with stack:

```
*** Aborted at 1612273824 (unix time) try "date -d @1612273824" if you are using GNU date ***
PC: @           0xe0cce7 rapidjson::GenericValue<>::Accept<>()
*** SIGSEGV (@0xe) received by PID 36798 (TID 0x7f7812114700) from PID 14; stack trace: ***
    @     0x7f791b74b470 (unknown)
    @           0xe0cce7 rapidjson::GenericValue<>::Accept<>()
    @          0x169ff79 _ZN5doris10JsonReader17_print_json_valueB5cxx11ERKN9rapidjson12GenericValueINS1_4UTF8IcEENS1_19MemoryPoolAllocatorINS1_12CrtAllocatorEEEEE
    @          0x16a0689 doris::JsonReader::_write_values_by_jsonpath()
    @          0x16a2cb4 doris::JsonReader::_handle_flat_array_complex_json()
    @          0x16a3761 doris::JsonScanner::get_next()
    @          0x1659bd4 doris::BrokerScanNode::scanner_scan()
    @          0x165a671 doris::BrokerScanNode::scanner_worker()
    @          0x281f67f execute_native_thread_routine
    @     0x7f791b5001c3 start_thread
    @     0x7f791b7fd12d __clone
```
2021-02-07 22:38:15 +08:00
780900ac9c [Feature] Support preceding filter original data when loading (#5338)
Support conditional filtering of original data in broker load and routine load
eg:

```
LOAD LABEL `label1`
(
DATA INFILE ('bos://cmy-repo/1.csv')
INTO TABLE tbl2
COLUMNS TERMINATED BY '\t'
(event_day, product_id, ocpc_stage, user_id)
SET (
	ocpc_stage = ocpc_stage + 100
)
PRECEDING FILTER user_id = 1381035
WHERE ocpc_stage > 30
)
...
```
2021-02-07 22:37:48 +08:00
c283bb3677 [Bug] Fix bug that not erase meta such as tablet when force drop db, table, partition (#5329) 2021-02-07 22:37:18 +08:00
f98b26645c [Bug] Set forceDrop to false when getDropPartitionClause for DynamicPartitionScheduler to avoid that the deleted partition cannot be recovered (#5319)
Co-authored-by: caiconghui [蔡聪辉] <caiconghui@xiaomi.com>
2021-02-07 22:36:54 +08:00
779c4629b4 [Bug] Fix bug of NPE when replaying spark load job. (#5367)
* [Bug] Fix bug of NPE when replaying spark load job.

The resourceDesc in spark load job may be null because it is not persisted.
So when replaying the job, we should check it.

* fix

* add ut
2021-02-07 11:25:06 +08:00
9c022e3764 [Bug] Spark doris connector http v2 authentication fails, and HTTP v2 interface returns json nesting problem (#5366)
1. Deal with the problem of inconsistent data format returned by http v1 and v2
2. Deal with user authentication failure
2021-02-07 09:28:55 +08:00
fd7caf775c [Bug] fix bug that dead lock may occur when drop tablet concurrent with tablet distribution interface (#5278)
Fix bug that dead lock may occur when drop tablet concurrent with calling tablet distribution interface.
2021-02-06 23:14:43 +08:00
4ce6f49c0f [LOG] Reduce verbose exception log by catch exceptions (#5229)
In our product environment, we use LVS to dispatch requests to FEs,
however, LVS will send probes to check whether FE is alive, and will
close the connection immediately. It will cause much verbose log,
this patch aim to reduce these log by catch related exceptions.
2021-02-06 23:14:26 +08:00
a6e2c3e3f1 [Bug][Clone] Fix the bug that incremental clone is not triggered (#5230)
In version 0.13, we support a more efficient compaction logic. 
This logic will maintain multiple version paths of the tablet.
This can avoid -230 errors and can also support incremental clone.

But the previous incremental clone uses the incremental rowset meta recorded in `incr_rs_meta`.
At present, the incremental rowset meta recorded in `incr_rs_meta` and the records
in `stale_rs_meta` are duplicated, and the current clone logic does not adapt to the
new multi-version path, resulting in many cases not triggering incremental clone.

This CL mainly modified:

1. Removed `incr_rs_meta` metadata
2. Modified the clone logic. When the clone is incremented, it will try to read the rowset in `stale_rs_meta`.
3. Delete a lot of code that was previously used for version compatibility.
2021-02-06 22:04:48 +08:00
2a2cec91f9 Adding a column with SUM aggregation to table should restrict the default value (#5315)
One Tablet have three replicas, the compaction progress is different.
Considering the following scenario, replica A have 3 versions(1, 2, 3);
replica B have 2 versions(1-2, 3);
replica C have 1 versions(1-3).
Now a column named city been added with default zero 1.
Replica A will be resulted as 3, replica B results as 2,
replica C results as 1.

So there is a necessity to restrict the default value to zero for SUM aggregation column.
2021-02-05 18:50:04 +08:00
d8202ca9cc [Enhancement] move common codes from fe-core to fe-common and remove log4j1 (#5317) (#5318)
The io related codes may be used by new modules, so It's better to move them to fe-common.

The modification to fe-core is frequent, but there are many generated java files by thrift
will slow down the compilation, so It's better to move thrift generation process to fe-common.

Currently both log4j1 and log4j2 are used, which leads to logs are written to wrong files.
Our modification will remove log4j1 from dependency, use slf4j + slf4j -> log4j2 instead.
2021-02-04 13:41:03 +08:00
b6abcbdd35 Fix 5243 Skip repair replica not in colocate group. (#5250)
* Fix 5243 Skip repair replica not in colocate group.

* Remove useless parameter& Add UT

* Update fe/fe-core/src/main/java/org/apache/doris/catalog/Tablet.java
2021-02-04 12:04:19 +08:00
ed9c70bdb9 [Bug] Fix bug of create ODBC table first column is float or double, issue#5350 (#5351) 2021-02-04 09:32:53 +08:00
a841905184 [optimization] use replace top instead of push pop in priority #5312 (#5313) 2021-02-04 09:21:54 +08:00
ea7f61e1c7 [Bug] Duplicate results when reading aggregation table (#5307)
Previously, we introduced an optimization logic for the aggr table,
that is, in the case of only one rowset and nonoverlapping,
the data can be read directly without merging.
But this logic has bugs.
2021-02-04 09:21:35 +08:00
77b756fb87 [Refactor] Remove redundant code of mini load and insert (#4966)
The content deleted by this PR includes mini load and insert in the old framework.
The task and scheduling logic of old framework has been deleted.
2021-02-03 22:19:20 +08:00
wyb
128752b4f9 [Routine load] Fix kafka load too many task bug (#5327) 2021-02-03 13:23:30 +08:00
059791c6ac [Config] Change some defualt value of Doris config (#5348)
1. Default enable bucket shuffle join in session variables.
2. Remove config of FE enable_odbc_table.
2021-02-03 13:22:38 +08:00
47e33c7987 Support create index on unique value column (#5305)
* support create index on unique table value columns
2021-02-03 13:22:00 +08:00
ddd85d8ae8 [ODBC] Fix Memory consumption of ODBC MySQL Driver (#5322) (#5323) 2021-02-01 00:12:49 +08:00
bb7ba00ccf [Backup]Support content, exclude and whole database in backup (#5314)
This PR support following functions:
1. Support content properties in backup stmt. It means user can backup only metadata or
meta+data which use content [METADATA_ONLY| ALL]attribute to distinguish.
2. Support exclude some tables in backup and restore stmt. This means that some
very large and unimportant tables can be excluded when the entire database is backed up.
3. Support backup and restore whole database instead of declaring each table name
in the backup and restore statement.

The backup and restore api has changed as following:
```
BACKUP SNAPSHOT [db_name].{snapshot_name}
TO 'repo_name'
[ON|EXCLUDE (
    'table_name' [partition (p1,...)]
)]
[properties (
    "content" = "metadata_only|all"
)]

RESTORE SNAPSHOT [db_name].{snapshot_name}
TO 'repo_name'
[EXCLUDE|ON (
    'table_name' [partition (p1,...)]
)]
[properties (
)]
```
2021-02-01 00:12:35 +08:00
Ben
7b5468e7b8 [Build] Fix ui build error: classnames and react-router dependencies (#5283) 2021-02-01 00:11:47 +08:00
2d70cc532c [Bug] Fix CompactionPermitLimiter cv starve bug (#5274)
Fix _permits_cv.wait maybe starve to death bug.
2021-02-01 00:11:29 +08:00
b315244ba7 [Doc] Fix the error description for the number of bytes of double type. (#5273)
Modify the error description of double type: 12 bytes is modified to 8 bytes
2021-02-01 00:11:14 +08:00
f3aded9370 [Bug] System metric init failed cause be start failed (#5262)
System metric init failed cause be start failed
2021-02-01 00:10:57 +08:00
be0b0f930c [Load] Load job should not begin transaction when task queue in loadingLoadTaskScheduler is full to avoid txn timeout (#5205) 2021-02-01 00:10:24 +08:00
cd96ded1ad [Bugs] Fix bugs that FE heartbeat api of httpv2 does not return version info (#5306)
Co-authored-by: morningman <chenmingyu@baidu.com>
2021-01-30 20:34:33 +08:00
de57667d6d [Delete] Support delete with multi partitions (#5252)
Support delete statement like:
1. delete from table partitions(p1, p2) where xxx;  // apply to p1, p2
2. delete from table where xxx;     // apply to all partitions

Also remove code about the deprecated sync/async delete job.

This CL changes FE meta version to 94
2021-01-30 20:33:34 +08:00
bf0cb78b67 [optimization] avoid extra memory copy while build hash table (#5301)
avoid extra memory copy while build hash table
2021-01-30 20:32:12 +08:00
8fe372f82b [Bug] Fix NoSuchElementException when accessing empty partition info (#5201) 2021-01-30 16:36:24 +08:00
90c2da54bd [Bug] Fix bug and add graceful exit for compaction producer (#5124)
1. add graceful exit mechanism for the compaction producer thread.
2. if compaction task submits unsuccessfully, the compaction task should pop from `_tablet_submitted_compaction`.
2021-01-30 16:35:36 +08:00
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