Commit Graph

1360 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
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
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
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
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
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
49b2bc39ae [Optimize] Reduce meaningless memory copies (#5748)
Reduce meaningless memory copies of rowset_meta pb
2021-05-05 10:20:09 +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
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
b3eacb69f9 check part_rowbatch_list is empty (#5727)
Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2021-04-30 10:14:07 +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
e519a24c9a dynamic adjust compaction policy (#5651)
Co-authored-by: weizuo <weizuo@xiaomi.com>
2021-04-26 12:39:13 +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
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
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
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
a803ceea86 [refactor] Remove boost mutex, use std::mutex instead (#5684)
* Remove boost mutex, use std::mutex instead

* replace shared_mutex
2021-04-22 11:29:36 +08:00
9b0d6ecaf0 [Log] Add error msg when tablet not found (#5659)
Before drop a tablet, it will try to find the tablet in tablet map.
But the tablet maybe has been not existed.
Therefore, it is better to print the error message and error status.
2021-04-21 16:37:47 +08:00
a4f8194111 [Audit][Stream Load] Support audit function for stream load (#5452)
Record finished stream load job (both successful job and failed job) into audit log
so that we can see when the stream load job was executed and check the details of stream load jobs.
2021-04-21 16:36:12 +08:00
b121ad6b95 [Refactor] Remove jprotobuf and use grpc client to connect brpc service (#5650) 2021-04-21 10:25:58 +08:00
d15fe05f3c [Metrics] Add metrics to monitor BE's agent task queue size (#5648)
* [Metrics] Add metrics to monitor BE's agent task queue size

Sometimes, user's DDL or background task may last a long time,
it's not easy to find out which procedure has problem.
This patch add metric to monitor BE's agent task queue size,
which would be helpful for troubleshooting.

The raw metrics on BE looks like:
doris_be_agent_task_queue_size{type="REPORT_OLAP_TABLE"} 0
doris_be_agent_task_queue_size{type="REPORT_DISK_STATE"} 0
doris_be_agent_task_queue_size{type="REPORT_TASK"} 0
doris_be_agent_task_queue_size{type="CHECK_CONSISTENCY"} 0
doris_be_agent_task_queue_size{type="DELETE"} 0
doris_be_agent_task_queue_size{type="CLEAR_TRANSACTION_TASK"} 0
doris_be_agent_task_queue_size{type="PUBLISH_VERSION"} 0
doris_be_agent_task_queue_size{type="UPLOAD"} 0
doris_be_agent_task_queue_size{type="DROP_TABLE"} 0
doris_be_agent_task_queue_size{type="CREATE_TABLE"} 39
doris_be_agent_task_queue_size{type="RELEASE_SNAPSHOT"} 0
doris_be_agent_task_queue_size{type="STORAGE_MEDIUM_MIGRATE"} 245
doris_be_agent_task_queue_size{type="CLONE"} 0
doris_be_agent_task_queue_size{type="MOVE"} 0
doris_be_agent_task_queue_size{type="ALTER_TABLE"} 0
doris_be_agent_task_queue_size{type="DOWNLOAD"} 0
doris_be_agent_task_queue_size{type="PUSH"} 0
doris_be_agent_task_queue_size{type="UPDATE_TABLET_META_INFO"} 0
doris_be_agent_task_queue_size{type="MAKE_SNAPSHOT"} 0

* fix typo
2021-04-21 09:23:33 +08:00
ab64dbe65d not need to deserialize again (#5644)
Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2021-04-21 09:23:12 +08:00
be733cfa9c [Metrics] Add some large memtrackers' metric (#5614)
MemTracker can provide memory consumption for us to find out which
module consume more memory, but it's just a current value, this patch
add metrics for some large memory consumers, then we can find out
which module consume more memory in timeline, it would be useful to
troubleshoot OOM problems and optimize configs.
2021-04-21 09:15:04 +08:00
18c260913b [BE] Set RowBlock's parent memtracker as instance tracker. (#5607) 2021-04-21 09:14:14 +08:00
a2e83e65d2 [BE] Add scanner/etl thread pool queue size metric. (#5619)
* [BE] Add scanner/etl thread pool queue size metric.

* Fix compilation problem.
2021-04-20 09:14:57 +08:00
7445051174 [Refactor] fix warning in gcc8+, update rapidjson (#5649) 2021-04-20 09:14:44 +08:00
caa7af3d1f [Metric] Standardise histogram metric output for prometheus (#5671)
Update histogram metric's output to prometheus standard, the output
like following:

test_registry_task_duration{quantile="0.50"} 50
test_registry_task_duration{quantile="0.75"} 75
test_registry_task_duration{quantile="0.90"} 95.8333
test_registry_task_duration{quantile="0.95"} 100
test_registry_task_duration{quantile="0.99"} 100
test_registry_task_duration_sum 5050
test_registry_task_duration_count 100
2021-04-20 09:14:28 +08:00
b4a4c29651 (#5638) stale rowset can't be access after clone finish (#5639)
* (#5638) stale rowset can't be access after clone finish

* clear stale rowset after clone
2021-04-19 09:27:41 +08:00
6f000c2ea4 (#5621) using KeyMayExist instead of Get when visit rocksdb (#5622) 2021-04-19 09:25:59 +08:00
892fbf6ded Update s3_reader_test.cpp (#5658) 2021-04-15 10:59:30 +08:00
c4cc681d14 remove boost_foreach, using c++ foreach instead (#5611) 2021-04-15 10:52:29 +08:00
50ffae44b1 [BUG] Fix bug that Unique/AGG key will read all key columns when there are two rowsets (#5632) 2021-04-14 00:12:05 +08:00
70b0d113e1 fix license header (#5630) 2021-04-13 11:01:29 +08:00
75db273b93 [Doris On ES][WIP] Support external ES table with SSL secured and configurable node sniffing (#5325)
Support external ES  table with `SSL` secured and configurable node sniffing
2021-04-12 11:23:49 +08:00
9c7d8d2e98 [Bug] Fix bug that isPreAggregation is incorrectly set (#5608)
1. The MaterializedViewSelector should be reset for each scan node
2. On the BE side, columns with delete conditions must be added to the return column.
2021-04-09 14:13:06 +08:00
40f53ac71f fix bitmap unit test failed (#5610) 2021-04-08 10:25:59 +08:00
2b5e4dc951 Add fmt library to speed up mysql text result serialization (#5554)
* Add fmt library to speed up mysql text result serialization

* use BUILD_SYSTEM instead of make

Co-authored-by: gaodayue <gaodayue@bytedance.com>
2021-04-08 09:16:58 +08:00
b423274f17 [Enhance] Make MemTracker more accurate (#5515) (#5516)
* [Enhance] Make MemTracker more accurate (#5515)
 This PR main about:
 1. Improve the readability of MemTrackers' name
 2. Add the MemTracker of:
    * Load
    * Compaction
    * SchemaChange
    * StoragePageCache
    * TabletManager
 3. Change SchemaChange to a Singleon

* revise some code for Code Review

* change the name of mem_tracker

* keep reader_context have the same lifetime of rowset_reader in schema change.

* change vlog notice to log(warning) in schema change
2021-04-08 09:14:55 +08:00