Commit Graph

2975 Commits

Author SHA1 Message Date
fc1389240f [Doc]Modify the flink connector document's instructions on enabling http v2 (#5883)
[doc]Modify the flink connector document's instructions on enabling http v2
2021-05-26 10:01:31 +08:00
629e440a67 [Bug] Fix the bug of nullif function: (#5882)
1. Prevent return NULL call nullif(98, null) in FE
2. Support DecimalV2 of nullif function to get the right result
2021-05-26 10:01:17 +08:00
510606ddd4 [DynamicPartition] Support specifying hot data partition (#5877)
In some scenarios, when users use dynamic partitions, they hope to use Doris' hierarchical storage
function at the same time.
For example, for the dynamic partition rule of partitioning by day, we hope that the partitions of the last 3 days
are stored on the SSD storage medium and automatically migrated to the HDD storage medium after expiration.

This CL add a new dynamic partition property: "hot_partition_num".
This parameter is used to specify how many recent partitions need to be stored on the SSD storage medium.
2021-05-26 10:00:24 +08:00
0b12218022 [Log] Change unauthorized access log to debug level (#5873) 2021-05-26 09:59:29 +08:00
9dd54b83b8 [optimize] avoid extra memory alloc in object pool (#5871) 2021-05-26 09:58:21 +08:00
ba69f7a7c8 [Command] [SQL] Add show database/table/partition id command (#5807)
In BE, when a problem happened, in the log, we can find the database id, table id, partition id,
but no database name, table name, partition name.

In FE, there also no way to find database name/table name/partition name accourding to
database id/table id/partition id. Therefore, this patch add 3 new commands:

1. show database id;
mysql> show database 10002;
+----------------------+
| DbName               |
+----------------------+
| default_cluster:test |
+----------------------+

2. show table id;
mysql> show table 11100;
+----------------------+-----------+-------+
| DbName               | TableName | DbId  |
+----------------------+-----------+-------+
| default_cluster:test | table2    | 10002 |
+----------------------+-----------+-------+

3. show partition id;
mysql> show partition 11099;
+----------------------+-----------+---------------+-------+---------+
| DbName               | TableName | PartitionName | DbId  | TableId |
+----------------------+-----------+---------------+-------+---------+
| default_cluster:test | table2    | p201708       | 10002 | 11100   |
+----------------------+-----------+---------------+-------+---------+
2021-05-26 09:58:02 +08:00
a55b12da90 [Doc] Fix some flaws in hll-type document (#5795)
Fix some flaws in hll-type document.
2021-05-26 09:56:55 +08:00
1ec615c562 [BUG] Fixed some uninitialized variables (#5850)
Fixed some potential bugs caused by uninitialized variables
2021-05-25 10:34:35 +08:00
63662194ab [BUG] Fix Stream Load cost too much memory (#5875) 2021-05-25 10:34:10 +08:00
d0ca7b037c [Bug] NULL value in where and on clause should return EmptySetNode (#5872) 2021-05-24 12:32:59 +08:00
76eca9de56 [Bug] Kill the FE process when writing BDBJE journal failed (#5861)
1. When an oom error occurs when writing bdbje, catch the error and exit the process.
2. Increase the timeout period of bdbje replica ack and change it to a configuration.
2021-05-22 23:38:47 +08:00
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