Commit Graph

2964 Commits

Author SHA1 Message Date
659d6347a0 [BUG] fix some extra memory in bitmap operate (#5857) 2021-05-22 23:38:28 +08:00
591d391bbc [Bug] Fix bug that the buffered reader may read at wrong position. (#5847)
The buffered reader's _cur_offset should be initialized as same as the inner file reader's,
to make sure that the reader will start to read at rignt position.
2021-05-22 23:38:10 +08:00
07ad038870 [Feature][RoutineLoad] Support for consuming kafka from the point of time (#5832)
Support when creating a kafka routine load, start consumption from a specified point in time instead of a specific offset.
eg:
```
FROM KAFKA
(
    "kafka_broker_list" = "broker1:9092,broker2:9092",
    "kafka_topic" = "my_topic",
    "property.kafka_default_offsets" = "2021-10-10 11:00:00"
);

or

FROM KAFKA
(
    "kafka_broker_list" = "broker1:9092,broker2:9092",
    "kafka_topic" = "my_topic",
    "kafka_partitions" = "0,1,2",
    "kafka_offsets" = "2021-10-10 11:00:00, 2021-10-10 11:00:00, 2021-10-10 12:00:00"
);
```

This PR also reconstructed the analysis method of properties when creating or altering
routine load jobs, and unified the analysis process in the `RoutineLoadDataSourceProperties` class.
2021-05-22 23:37:53 +08:00
5a06dba4f1 [Colocate plan][Step2] Colocate aggregation covers more situations (#5555)
The old colocate aggregation can only cover the case where the child is scan.
In fact, as long as the child's data distribution meets the requirements,
no matter what the plan node on the child node is, a colocate aggregation can be performed.

This PR also fixes the correct data partition attribute of fragment.
The data partition of fragment which contains scan node is Hash Partition rather than Random.
This modification is mainly to determine the possibility of colocate
through the correct distribution of child fragments.
2021-05-22 23:36:49 +08:00
d4cc5735ac [Bug-fix][Backup] Modify the persistence logic of backup and restore (#5853)
The expose annotation is used in the persistence logic used by the old backup recovery.
This annotation by itself is meant to ignore some variables when serializing and deserializing.
However, this variable was used incorrectly and gson did not ignore the variables that should have been ignored.
This results in duplicate initialization when fe is restarted.

This pr uses the doris wrapped Gson directly, than eliminates the use of the expose annotation.
Fixed sortedTabletInfoList being repeatedly initialized resulting in incorrect numbers.

Fixed #5852
2021-05-21 12:23:07 +08:00
109b55ee5f [Shell] Add build parallel option (#5819)
Add build parallel option then we can build project with a user specified parallel not a fixed value.
2021-05-19 09:32:58 +08:00
12e4ff2689 [Doc] Fix doc for 'SHOW EXPORT' (#5840) 2021-05-19 09:31:57 +08:00
3406f09f55 [Doc] Fix metadata-design.md misspelling (#5837)
整体架构: "负责数据存储于管理"-> "负责数据存储与管理"
2021-05-19 09:31:06 +08:00
ad2820768c [Build] Enable brpc cpu and heap profile (#5835)
Enable brpc profile with macro BRPC_ENABLE_CPU_PROFILER,
so that we can get cpu and heap profile at runtime via brpc web interface.
2021-05-19 09:30:25 +08:00
3bee6c69ed [FE] [Refactor] Remove a useless MD5 calculation in PluginZip. (#5834)
Remove a useless MD5 calculation in PluginZip.
2021-05-19 09:30:05 +08:00
2b1075adf9 [Build] Modify the build script to automatically create a log directory (#5826) 2021-05-19 09:29:37 +08:00
9eacd0a89c [Doc] remove storage_type from docs (#5814) 2021-05-19 09:29:15 +08:00
bf4443578c [Feature] Support show view statement for table (#5813)
Help to find all views which contain the given table
2021-05-19 09:29:00 +08:00
7ef9aa13d4 [Bug] Modify spark, flink doris connector to send request to FE, fix the problem of POST method, it should be the same as the method when sending the request (#5788)
Modify spark, flink doris connector to send request to FE, fix the problem of POST method,
it should be the same as the method when sending the request
2021-05-19 09:28:21 +08:00
1a81b9e160 [MemTracker] Some enchance of MemTracker (#5783)
1 Make some MemTracker have reasonable parent MemTracker not the root tracker
2 Make each MemTracker can be easily to trace.
3 Add show level of MemTracker to reduce the MemTracker show in the web page to have a way to control show how many tracker in web page.
2021-05-19 09:27:50 +08:00
65ff464e3d [Feature] Support show data order by (#5770)
Currently, the `show data` does not support sorting. When the number of tables increases, it is inconvenient to manage. Need to support sorting

like:
```
mysql>  show data order by ReplicaCount desc,Size asc;
+-----------+-------------+--------------+
| TableName | Size        | ReplicaCount |
+-----------+-------------+--------------+
| table_c   | 3.102 KB    | 40           |
| table_d   | .000        | 20           |
| table_b   | 324.000 B   | 20           |
| table_a   | 1.266 KB    | 10           |
| Total     | 4.684 KB    | 90           |
| Quota     | 1024.000 GB | 1073741824   |
| Left      | 1024.000 GB | 1073741734   |
+-----------+-------------+--------------+
```
2021-05-19 09:27:27 +08:00
5748241dab [Bug-fix] When query cancel, transfer_thread does not continue to schedule scanner_thread (#5768)
The cause of the problem is that after query cancel, OlapScanNode::transfer_thread still continues to schedule 
OlapScanNode::scanner_thread until all tasks are scheduled.

Although each task does not scan data and exits quickly, it still consumes a lot of resources.
(Guess)This may be the cause of the BUG (#5767) causing the I/O to be full.

So after query cancel, immediately exit the scheduling loop in transfer_thread, and after waiting for
the end of all scanner_threads, transfer_thread will also exit.
2021-05-19 09:26:58 +08:00
8d74176970 [Optimize] Check invalid datetime to avoid scanning a lots of partitions (#5643)
Support parsing date format `'%Y-%m-%d %H:%i' and '%Y-%m-%d %H'
Support handling date time with nanoseconds
2021-05-19 09:25:58 +08:00
add8c4bb74 [Load] Support reading multi-line json objects for JsonScanner (#5774)
Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-05-18 15:44:45 +08:00
17cd32ffee [BUG] Fixed uninitialized variables in compaction (#5828) 2021-05-18 12:13:58 +08:00
9431090c0e Add flink doris connector design document (#5709)
* Solve the situation that the hardware information of the Web UI home page cannot be loaded

Solve the situation that the hardware information of the Web UI home page cannot be loaded

* Add flink doris connector design document

Add flink doris connector design document

* flink doris connector design english docment

flink doris connector design english docment

Co-authored-by: zhangjf@shuhaisc.com <zhangfeng800729>
2021-05-17 11:53:43 +08:00
4de21d604a [Debug Enhancement] Associate the old and new query id by retry (#5820)
When a query is retried, the FE log cannot quickly associate the new and old queries by query id.
This will increase the complexity of troubleshooting.
Modify the log printing logic of FE to associate the new and old query ids, and the print log looks like this:
Query {old_query_id} {retry_times} times with new query id: {new_query_id}
2021-05-17 11:53:21 +08:00
8610903924 abstract some codes to a new parse method for further scalability (#5800) 2021-05-17 11:52:45 +08:00
2883ebeb0a [Compile] fix s2 link /usr/local/openssl (#5810) 2021-05-17 11:52:21 +08:00
d0462f4383 [Bug] Fix Backend UT Problem (#5784) (#5785)
1. relocation R_X86_64_32 against `__gxx_personality_v0' can not be used when making a shared object; recompile with -fPIC
2. warning: the use of `tmpnam' is dangerous, better use `mkstemp'
3. Death tests use fork(), which is unsafe particularly in a threaded context. For this test, Google Test couldn't detect the number of threads.
2021-05-17 11:51:59 +08:00
00a60ae5bb Enable http v2 (#5797)
* Solve the situation that the hardware information of the Web UI home page cannot be loaded

Solve the situation that the hardware information of the Web UI home page cannot be loaded

* Http v2 version is enabled by default

Http v2 version is enabled by default

Co-authored-by: zhangjf@shuhaisc.com <zhangfeng800729>
2021-05-17 11:51:41 +08:00
a359b1cb8b [UT] fix ut failed in new_metrics_test (#5817) 2021-05-17 11:51:22 +08:00
9d25bfe980 [Bug] Fix bug that database not found when replaying batch transaction remove log (#5815)
* [Bug] Fix bug that database not found when replaying batch transaction remove log

[GlobalTransactionMgr.replayBatchRemoveTransactions():353] replay batch remove transactions failed. db 0
org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = databaseTransactionMgr[0] does not exist
        at org.apache.doris.transaction.GlobalTransactionMgr.getDatabaseTransactionMgr(GlobalTransactionMgr.java:84) ~[palo-fe.jar:3.4.0]
        at org.apache.doris.transaction.GlobalTransactionMgr.replayBatchRemoveTransactions(GlobalTransactionMgr.java:350) [palo-fe.jar:3.4.0]
        at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:601) [palo-fe.jar:3.4.0]
        at org.apache.doris.catalog.Catalog.replayJournal(Catalog.java:2452) [palo-fe.jar:3.4.0]
        at org.apache.doris.master.Checkpoint.runAfterCatalogReady(Checkpoint.java:101) [palo-fe.jar:3.4.0]
        at org.apache.doris.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:58) [palo-fe.jar:3.4.0]
        at org.apache.doris.common.util.Daemon.run(Daemon.java:116) [palo-fe.jar:3.4.0]

The id of information_scheam database is 0, and it has no txn at all.
2021-05-17 11:50:46 +08:00
01a45e8691 add read buffer when use s3 reader (#5791) 2021-05-17 11:46:38 +08:00
e7a6d659a9 [Optimize] Use BufferedOutputStream to speed up checkpoint (#5802)
Use BufferedOutputStream to speed up checkpoint
2021-05-13 22:34:23 +08:00
7c9396b760 [Bug-fix] Fix Be cores when user specified HLL or BITMAP as operand of BinaryPredicate (#5799)
Fix be cores when user specified HLL or BITMAP type as operand of BinaryPredicate.
2021-05-13 22:33:57 +08:00
0c83e43a67 [Optimize] Optimize profile lock conflict and view profile while query is executing (#5762)
1. Reduce lock conflicts in RuntimeProfile of be;
2. can view query profile when the query is executing;
3. reduce wait time for 'show proc /current_queries'.
2021-05-13 22:33:26 +08:00
bdd2a6d055 [Optimize] Make array config readable (#5780) 2021-05-12 11:01:07 +08:00
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