Commit Graph

2931 Commits

Author SHA1 Message Date
b686205b97 [Optimize] Reduce lock conflicts in ThreadResourceMgr of be (#5772)
Removed some useless code that caused lock conflicts in ThreadResourceMgr of be.
2021-05-12 10:59:53 +08:00
d784cc06f6 [Doc] Flink doris connector document modification (#5769) 2021-05-12 10:59:35 +08:00
d7d50f7ffa [Optimize] Speed up the bulk data load to ODBC table. (#5765)
1. Batch Insert
2. Use fmt to repalce stringstream
3. Add some profile of ODBC_TABLE_SINK
2021-05-12 10:58:52 +08:00
bd88309346 [Refactor] fix warning in gcc8+, fix warning from brpc, s2 (#5763)
Fix warning from brpc, S2
Fix -Warray-bounds
2021-05-12 10:38:46 +08:00
55ca52a42d [Bug] Fix bug that Drop olap table may introduce some problems when table's state is not normal (#5712)
Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-05-12 10:38:23 +08:00
5fed34fcfe [optimize] provide a better defer operator (#5706) 2021-05-12 10:37:23 +08:00
f4f0253e4f [Metrics] Add metric item for histogram (#5698)
Add metric items (`max`、`min`、`average`、`median` and `standard deviation`) for prometheus histogram metrics.
2021-05-12 10:31:42 +08:00
c6bbc68e16 [Bug] Fix Backend edit log read bug (#5775)
This bug is introduced from #5722

Also fix a bug of creating dynamic history partitions, introduced from #5703
2021-05-10 10:27:27 +08:00
98e80aa65e [refactor] Replace boost::function with std::function (#5700)
Replace boost::function with std::function
2021-05-09 22:00:48 +08:00
11cce06962 [Feature] Support create history dynamic partition (#5703)
1. Add a new dynamic partition property `create_history_partition`.
    If set to true, Doris will create all partitions from `start` to `end`.

2. Add a new FE config `max_dynamic_partition_num`
    To limit the number of partitions created when creating one table.
2021-05-08 12:05:19 +08:00
86d2ddc503 [UT] Fix bug for cache unit test (#5766)
For #5726 . Last commit is not logic perfect, which will cause some unit tests not passed.
2021-05-08 10:57:09 +08:00
3fdfe0ba6f [Bug-fix] Export specified column (#5759)
The code logic error causes the user to specify the export column, which may not be effective.
The PR fix this problem.
2021-05-08 10:56:45 +08:00
efd51b47e5 [Bug] Fix some little bugs in FE (#5758)
1. Fix NPE in ReplicasProcNode when backend does not exist
2. Forbid the create table like statement to specify the view.
3. Check self ip when starting FE to see if it use the origin ip.
4. Modify the error msg of tablet sink to show more detail errors.
2021-05-08 10:56:10 +08:00
ab2f825a88 [Bug-fix] Pause routine load when data size exceeds quota (#5749)
In the previous code, the routine load task did not catch the exception of opening the transaction.
As a result, although the task cannot be executed,
no exceptions can be seen during show routine load, only the routine load job is stuck.

The PR catch the QuotaExceedException when opening a transaction.
If the routine load task cannot be executed due to the exhaustion of the quota,
the routine load will be paused and an error message will be presented to the user.

Similarly, other load method will also catch similar exceptions and cancel job.
2021-05-07 11:19:36 +08:00
8850cfe2ad [Compaction] Modify compaction logic (#5737)
1. Add /api/compaction/run_status to show the running compaction tasks.
2. Support do base and cumulative compaction for one tablet at same time.
3. Modify some log level.
4. Add a feedback document.
2021-05-07 11:18:47 +08:00
9f706848b9 [Bug] Fix somg bugs about Spark Load (#5701)
The distinct count result of bitmap/hll column may be incorrect in the spark load mode.

Fix some bugs in spark load to solve the above problem.
1. FE is big end but BE is little end. BitmapValues should be transfered to little end in FE's serialization
2. BitmapUnionAggregator/HllUnionAggregator ignore `null` value
3. Make sure encodeVarint64 in FE is consistent with BE

Co-authored-by: weixiang <weixiang06@meituan.com>
2021-05-07 11:18:23 +08:00
6a1313594c [Thirdparty] Fix thirdparty build failed (#5754) 2021-05-05 10:20:25 +08:00
49b2bc39ae [Optimize] Reduce meaningless memory copies (#5748)
Reduce meaningless memory copies of rowset_meta pb
2021-05-05 10:20:09 +08:00
04d12fbb00 [Bug] Optimize querying from PostgreSQL and MySQL compatibility (#5741)
1. Use the param `UseDeclareFetch` to fix the memory consumption of PostgreSQL Driver
2. Fix the bug of mysql client 5.1 query failed Doris
2021-05-05 10:19:50 +08:00
eb1fdd019d [Bug-fix] Fix the replay error in stream load manager (#5722)
The previous replay logic does not record the size of the map, which eventually resulted in EOF when reading the log.
This pr replaces the replay logic directly with json.

At the same time, the replay logic of image is supplemented.
The pr ensure that the attributes 'lastStreamLoadTime' of backend can be correctly recorded in the image.
2021-05-05 10:18:51 +08:00
a6e197bcdc [License] add license to file header and fix Notice file (#5717) 2021-05-05 10:18:03 +08:00
6250fb9413 zonemap compatible with previous version-0.12 (#5694)
Doris version-0.12 V1 segment only supports creating zone map index for key columns.
Doris version-0.13 supports creating zone map index for key columns and duplicate model columns.
Latest version supports creating zone map for key columns in AGG_KEYS or all columns in UNIQUE_KEYS or DUP_KEYS. 
In V1 Segment file, the tablet meta contains zone map index. But in V2 Segment file, it does not.

When upgrade Doris from version-0.12 to version-0.13, we found the memory is obviousely increasing in table
with V1 segment file. Because a lots value columns create zone map index.
Therefore, it is better to be compatible with version-0.12. The config `enable_value_column_zonemap` is default false.
If it is need to add zone map index for value columns, you can set it true.
2021-05-05 10:17:12 +08:00
58d0c8971e [Bugfix] Fix BE metrics http API dead lock bug (#5730) 2021-04-30 10:15:33 +08:00
5bfae7674c Fix cancel load path variable LABEL_KEY (#5724) (#5725)
Co-authored-by: 迟成 <chicheng@meituan.com>
2021-04-30 10:14:51 +08:00
b3eacb69f9 check part_rowbatch_list is empty (#5727)
Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2021-04-30 10:14:07 +08:00
507664a44d fix spelling mistake in alter table doc (#5723)
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-04-30 10:12:50 +08:00
6ad1bf7d7e [Bug] Fix dead lock in olap scan node and refactor some code in FE profile (#5713)
* [Bug] Fix dead lock in olap scan node and refactor some code in FE profile

* Add some comment
2021-04-30 10:12:18 +08:00
8ff87409cb [Bugfix] Fix the incorrect compaction type of compaction API has no corresponding response (#5710) 2021-04-30 10:12:04 +08:00
3de42999e0 [Config]Add uri param to demonstrate tablet meta content of byte type for debug (#5693)
* add switch to demonstrate tablet meta of byte type for debug

Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2021-04-30 10:11:35 +08:00
f570e965f2 [Bug] The operator on single Sql has affected the session varaiables (#5620) 2021-04-30 10:09:41 +08:00
3f8834ac0e fix double slashes when join paths (#5734) 2021-04-30 09:55:52 +08:00
8b7ae1784a [Apache] Change download link to archive page (#5731)
* [Apache] Change download link to archive page

Only the latest package should appear in svn.
The old release package already has been archived, so the download link should be replaced by archive page.
2021-04-29 15:49:34 +08:00
faf5adc4ee [UT] Fix ut failed for CreateTableTest (#5721)
Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-04-29 09:21:02 +08:00
9001fd28f4 support show stream load sql (#5488)
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-04-29 09:20:35 +08:00
c7af83b7c7 Support specify certain columns in export stmt (#5689)
Data export function, add certain columns that can be exported to the table.
Export stmt properties ("columns" = "k1, k2, k3");
2021-04-27 18:35:58 +08:00
827f5c0867 [Bug-fix] Ignore modified table log when table has been dropped (#5688)
Although the table lock can control the simultaneous modification of the table by different threads.
But it cannot control the drop operation of the table by other threads.
For example, when drop table and table update occur at the same time.

1. get table object by thread 1
2. drop table by thread 2 with table lock
3. update table object by thread 1

The above process is possible.
At this time, step 3 actually operates a table that no longer exists, which will eventually cause the wrong metadata to be recorded.

Fixed #5687
2021-04-27 09:40:17 +08:00
e519a24c9a dynamic adjust compaction policy (#5651)
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-04-26 12:39:13 +08:00
1783dbf340 [UT] Fix list partition UT failure (#5705) 2021-04-26 09:31:35 +08:00
de87f4ae84 [Feature] Add list partition support (#5529)
Add list partition support
2021-04-24 17:42:27 +08:00
84f6d74322 [Optimize] Sort trashed files by name and skip processing unexpired files (#5678) 2021-04-24 17:42:06 +08:00
29a3fa1084 [Feature] Support read data with format of parquet from hdfs, using libhdfs3 (#5686)
Add new lib, Backend can read data from hdfs without broker,
this patch include libhdfs3.a which can read file on hdfs.
This patch will make reading the data from hdfs with parquet possible.
By this, we will support more format of file on hdfs in the future,
and we will support other metadata in the future.
2021-04-24 17:41:48 +08:00
a1fa392f1f [Doc] Missing sidebar of flink connector doc (#5695) 2021-04-23 22:21:06 +08:00
ad3a0fb79d [Metric] Add metrics of tablet version num distribution (#5665)
Add metrics (P50, P75, P90, P95, P99, etc.) to show the distribution of tablets version count.

```
# TYPE doris_be_tablet_version_num_distribution histogram
doris_be_tablet_version_num_distribution{quantile="0.50"} 9.21429
doris_be_tablet_version_num_distribution{quantile="0.75"} 11.7949
doris_be_tablet_version_num_distribution{quantile="0.90"} 13
doris_be_tablet_version_num_distribution{quantile="0.95"} 13
doris_be_tablet_version_num_distribution{quantile="0.99"} 13
doris_be_tablet_version_num_distribution_sum 950
doris_be_tablet_version_num_distribution_count 100
```
2021-04-23 21:23:22 +08:00
12b2447724 [Optimize] Optimize the assign logic of compaction tasks to avoid starvation (#5683)
1. Reserve a slot to ensure that the cumulative compaction can be executed.
2. Ensure that the compaction score metric can be updated.
2021-04-23 09:48:37 +08:00
b93e841688 [Optimize] Remove expired txns in batch to avoid holding lock for too long (#5675)
This CL mainly changes:

1.  Add a config to control the expire time of load job

    Add a new FE config "streaming_label_keep_max_second" to control
    the expire time of some high frequency load job such as INSERT and STREAM LOAD.

2. Remove expired txn in batch to avoid holding transaction lock for a long time
2021-04-23 09:47:30 +08:00
ec29322c10 [Bug] Avoid waiting too long when rpc is slow. (#5669)
Total execution time should not longer than stream load timeout.
2021-04-23 09:46:40 +08:00
b12399657b [Bug] Fix StackOverFlow bug after rewriting the column descs of load stmt (#5656)
1. Fix a Self-referencing bug.
2. Also fix a display bug of SHOW BROKER.
2021-04-23 09:45:39 +08:00
4fa25b6eb9 [Optimize] make tablet meta checkpoint to be threadpool model (#5654)
Currently Tablet meta checkpoint is a memory-exhausted operation.
If a host has 12 disks, it will start 12 threads to do tablet meta checkpoint.
In our experience, the data size of one tablet can be as high as 2G.
If 12 threads do the checkpoint at the same time, it maybe cause OOM.

Therefore, this PR try to solve this problem.
Firstly, it only start one thread to produce table meta checkpoint tasks.
Secondly, it creates a thread pool to handle these tasks.
You can configure the size of the thread pool to control the parallelism in case of OOM.
It is a producer-customer model.
2021-04-23 09:45:15 +08:00
7eea811f6b [Feature] Flink Doris Connector (#5372) (#5375) 2021-04-23 09:43:48 +08:00
f5cf008bcc [Bug] Fix stream load UT failed (#5692)
Also move the stream load rocksdb dir to the first of storage root paths
2021-04-23 09:33:42 +08:00