Commit Graph

1503 Commits

Author SHA1 Message Date
2998373354 [Bug] Fix bug that select into outfile in parquet format may cause NPE (#6054)
1. check the parquet schema property on FE side.
2. auto generate parquet schema if not specified.
2021-06-23 11:33:47 +08:00
72d1a3b39c fix spring boot web maximum upload file limit config (#6070)
Co-authored-by: zouxinyi <zouxinyi@baidu.com>
2021-06-22 10:46:26 +08:00
b9ad34736d [Feature] Support recording custom number of backup and restore task information (#5947)
* Record all backup jobs and support where clause
2021-06-22 09:19:54 +08:00
abcd56c6c8 [Enhance] Support show unrecoverable tablets (#6045)
* [Enhance] Support show unrecoverable tablets

The unrecoverable tablets are tablets which non of their replicas are healthy.
We should be able to find out these tablets then manual intervention.

And these tablets should not be added to the tablet scheduler.
2021-06-22 09:19:12 +08:00
882ebd3d7d [Bug] Fix show data bug (#6060) 2021-06-20 16:15:54 +08:00
5b2d07ca2f [Bug] Fix disk TotalUsedPct display error (#6059)
Fix TotalUsedPct display error
2021-06-20 16:15:39 +08:00
1d796d9aa4 [Bug] Fix bug that routine load job may cause dead lock (#6058)
To make source the routine load job's lock must be released after txn aborted
2021-06-20 16:14:47 +08:00
fe0912f6e5 [SQL] Compatible with mysql nulls order by (#6043) 2021-06-20 16:12:52 +08:00
bf2423c91a [httpv2] Spring boot http upload file maximum limit parameterization (#6013)
spring.servlet.multipart.max-file-size and spring.servlet.multipart.max-request-size  Configurable
2021-06-20 16:10:54 +08:00
9bc2df43a7 [Bug][Export] Fix bug of one more record showed in the “show export limit n" (#6012) 2021-06-20 16:10:21 +08:00
bff6ede94e add data size field for partition cache (#6026)
Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2021-06-18 11:40:00 +08:00
ff47dc750d [Bug] Fix problem for thread safety issues and setting the status of non-existent replica does not prompt any error message (#6019)
Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-06-18 10:50:47 +08:00
99d8110972 [Bug-fix] Fix wrong data distribution judgment (#6029)
* [Bug-fix] Fix wrong data distribution judgment

The Fragment where OlapScanNode is located has three data distribution possibilities.
1. UNPARTITIONED: The scan range of OlapScanNode contains only one instance(BE)
2. RANDOM: Involving multi-partitioned tables in OlapScanNode.
3. HASH_PARTITIONED: The involving table is in the colocate group.

For a multi-partition table, although the data in each individual partition is distributed according to the bucketing column,
the same bucketing column between different partitions is not necessarily in the same be.
So the data distribution is RANDOM.

If Doris wrongly plan RANDOM as HASH_PARTITIONED, it will lead to the wrong colocate agg node.
The result of query is incorrect.
2021-06-18 09:21:46 +08:00
d2c1cddd55 [Bug-fix] Avoid using 'QueryDetail' in planning stage (#6018)
QueryDetail is used to statistic the current query details.
This property will only be set when the query starts to execute.
So in the query planning stage, using this attribute in the first query will cause 'NullPointerException'.
After that, this attribute retains the value of the previous query
until it is updated by the subsequent process.
Because code of 'colocateagg' uses this attribute incorrectly in its planning,
it causes 'NullPointerException' when clients like pymysql connect to doris and send the first query.
Fixed #6017
2021-06-16 09:40:53 +08:00
daf8ce29ca [Bug] Fix bucket shuffle bug when left table is without any data (#5965) 2021-06-16 09:39:31 +08:00
d0b60541af [Bug] fix use uncorrect table name in expand star (#6003)
SelectStmt use new TableName(null, tableRef.getAlias()) to expand star expression. tableRef.getAlias() is full name include database name and table name. 
Using it as table name will generate wrong sql in CreateViewStmt. 
This patch fix this problem and use correct database name and table name in expand star method.
2021-06-15 14:18:00 +08:00
54c7d177f8 [Log] Fix a log issue in BDBJournalCursor (#6006) 2021-06-10 17:39:25 +08:00
d33a6d1b98 [Function] Support date function: yearweek(), week(), makedate(). (#6000) 2021-06-10 17:38:25 +08:00
206a711f9b [Bug] SimplifyInvalidDateBinaryPredicatesDateRule may cause invalid query plan (#5987)
1. "where 1k > to_date(now())" will return EMPTYSET in query plan.
2. DateLiteral should accept date string like "2021-6-1".
2021-06-10 17:37:26 +08:00
97ed59780d [Bug] Outer join dispose constexpr error in inlineview (#5986) 2021-06-10 17:36:29 +08:00
e7a7b8d2d1 [Bug] Fix bug that start time is null when SQL is forward to master (#5966) 2021-06-10 17:34:59 +08:00
6106cc7d96 [Doris On ES][Bug-Fix] split es publish_address if it has host (#5955) 2021-06-10 17:34:44 +08:00
e245aee33e [Feature] Select outfile support parquet format (#5938)
`Select outfile into` currently only supports to export data with CSV format.
This patch extends the feature to supports parquet format.

Usage:
LocaFile:
```
SELECT citycode FROM table1 INTO OUTFILE "file:///root/doris/" FORMAT AS PARQUET PROPERTIES 
("schema"="required,int32,siteid;", "parquet.compression"="snappy");
```

BrokerFile:
```
SELECT siteid FROM table1 INTO OUTFILE "hdfs://host/test_sql_prc_2019_02_19/" FORMAT AS PARQUET
PROPERTIES ( 
"broker.name" = "hdfs_broker",
"broker.hadoop.security.authentication" = "kerberos",
"broker.kerberos_principal" = "test",
"broker.kerberos_keytab_content" = "base64" ,
"schema"="required,int32,siteid;"
);
```

Field `schema` is required, which defines the schema of a parquet file.
Prefix `parquet.` is the parquet file properties, like compression, version, enable_dictionary.
2021-06-10 17:34:01 +08:00
ad365b3b64 [Bug] Fix bug that cannot cancel alter table operation when table is unstable (#5998)
Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-06-09 15:00:17 +08:00
d9c128b744 [BrokerLoad] Support read properties for broker load when read data (#5845)
* [BrokerLoad] support read properties for broker load when read data

Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-06-09 14:59:55 +08:00
c95bebfa5c [Bug] Ignore drop table log when table has been dropped (#5973)
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.

get table object by thread 1
drop table by thread 2 with table lock
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 NullPointerException.

In fact, the modified table log after the drop table can be ignored. The reason is that it is meaningless to modify information on a table that no longer exists.

Fixed #5687
2021-06-09 13:00:16 +08:00
60062d97da [Enhance] convert byte size into a human-readable format (#5970) 2021-06-06 22:07:58 +08:00
4b23bca2be [Refactor] catch throwable instead of exception (#5942)
Co-authored-by: 孙忠健(20113660) <sunzj10@ke.com>
2021-06-06 22:06:02 +08:00
f1e881e6f0 [Bug-fix] Show view stmt report error when view references invalid table (#5919) 2021-06-06 22:05:22 +08:00
a5c35eb20f [Bug] Fix the bug of null pointer exception of colocate join (#5961) 2021-06-04 10:19:58 +08:00
3ca6e386c7 [Function] Support Function current_timestamp(), curtime(), current_time() in FE. (#5946)
Support Function `current_timestamp()`, `curtime()`, `current_time()` in FE to do constant fold.
2021-06-03 18:39:19 +08:00
8e4b601ff2 [Bug] Fit the bug of check Fragment whether is colocate / bucket shuffle join error (#5940) 2021-05-31 12:14:44 +08:00
cf2e0cf2c8 [Bug] Fix export job sometimes stuck in exporting state after timeout (#5932)
Fix #5931
The reason is that sometime the method coordinate.exec() is not call when the job is timeout,
so that the query profile in this coordinate is not be initialized,
which will cause an NPE error in the execution of ExportExportingTask.
2021-05-30 23:09:29 +08:00
ba868c610f [Optimize] Optimize some tablet scheduling logic (#5926)
1. The partitions set by the admin repair command are prioritized
   to ensure that the tablets of these partitions can be repaired as soon as possible.

2. Add an FE metric "query_begin" to monitor the number of queries submitted to the Doris.
2021-05-30 23:08:59 +08:00
0da59aab53 [Bug] Fix bug of multi load and some issue about httpv2 (#5848)
To be compatible with http v1 so that user don't need to change their code
2021-05-30 23:08:38 +08:00
63c99eb4cb [Cache][Enhancement] Assure sql cache only one version (#5793)
For PR #5792. This patch add a new param `cache type` to distinguish sql cache and partition cache.
When update sql cache,  we make assure one sql key only has one version cache.
2021-05-28 13:45:47 +08:00
c844e602a7 [BUG] Fix the bug of Desc Query cause Unknown error and some doc revise (#5921) 2021-05-28 11:21:31 +08:00
aa17d40865 [Bug-fix] Update correct data partition of fragment which contains Repeat Node (#5910)
The Repeat Node will change the data partition of fragment
  when the origin data partition of fragment is HashPartition.
The Repeat Node will generate some new rows.
The distribution of these new rows is completely inconsistent with the original data distribution,
  their distribution is RANDOM.

If the data distribution is not corrected,
  an error will occur when the agg node determines whether to perform colocate.
Wrong data distribution will cause the agg node to think that agg can be colocated,
  leading to wrong results.
For example, the following query can not be colocated although the distributed column of table is k1:
```
SELECT k1, k2, SUM( k3 )
FROM table
GROUP BY GROUPING SETS ( (k1, k2), (k1), (k2), ( ) )
```
2021-05-27 22:06:10 +08:00
ce3ae764e5 [Bug] Bucket Shuffle Join may cause:Failed to send brpc batch, Not connected to 0.0.0.0:0 (#5901) 2021-05-27 22:05:15 +08:00
d958bbedc9 [Bug] Fix the problem that the result of query from the view is incorrect (#5860) (#5897)
Fix an issue where the priority of CompoundPredicates in created view does not match the expectation.
2021-05-27 22:04:33 +08:00
ba38973209 use virtual hosted-style request to access object store (#5894)
* use virtual hosted-style access request object store
2021-05-27 15:52:07 +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
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
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
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
12e4ff2689 [Doc] Fix doc for 'SHOW EXPORT' (#5840) 2021-05-19 09:31:57 +08:00