Commit Graph

3111 Commits

Author SHA1 Message Date
d79cdc829f [Bug] Filter out unavaliable backends when getting tablet location (#6204)
* [Bug] Filter out unavaiable backends when getting scan range location

In the previous implementation, we will eliminate non-surviving BEs in the Coordinator phase.
But for Spark or Flink Connector, there is no such logic, so when a BE node is down,
it will cause the problem of querying errors through the Connector.

* fix ut

* fix compiule
2021-07-13 11:17:49 +08:00
76e148988a Support alter default bucket_num of partitioned olap table (#6023)
* Support modify partitioned olap table's bucket num

Co-authored-by: EmmyMiao87 <522274284@qq.com>
2021-07-12 20:28:40 +08:00
dd15da4e12 [DynamicPartition] Fix UT and add more tests for dynamic partition (#6198) 2021-07-12 15:31:33 +08:00
56112c4718 [Bug] Fix bug that adding conflicting partition doesn't report errors (#6109)
* [Bug] Fix bug that adding conflicting partition doesn't report errors

Co-authored-by: caiconghui <caiconghui@xiaomi.com>
2021-07-12 13:32:44 +08:00
dbfe8e4753 [enhancement] Optimize load CSV file memory allocate (#6174)
Optimize load CSV file memory allocate, avoid frequent allocation,
may reduce the load time by 40%-50% when large column numbers
2021-07-12 09:58:45 +08:00
b5f447b932 [ResourceLimit] Add a property to limit user instance num. (#6159)
Add a property to limit user instance num.
2021-07-10 10:15:05 +08:00
5a1aa3ec35 [Bug][Dynamic partition] Forward show dynamic partition tables stmt to Master (#6190)
1.
Only Master FE has these info.
Also catch more exception of dynamic partition scheduler.

2.
Forward admin show frontend config stmt to Master if set forward_to_master=true
2021-07-10 10:14:04 +08:00
de2dd2c015 [Thirdparty] Move DataTables download url to a fixed download address (#6189)
The origin download url is always changing: https://datatables.net/download/builder?bs-3.3.7/jq-3.3.1/dt-1.10.25
So we put it in our own http server.
If someone can offer an official url for DataTables, please update this.
2021-07-10 10:13:26 +08:00
3ad12c5f8a [Log] Optimize delete error message (#6187)
## Proposed changes

When a delete error occurs, the error message is ambiguous.

```sql
mysql> DELETE FROM nebula_trade_health_trade PARTITION q3_2021 WHERE event_day = '20210706';
ERROR 1064 (HY000): errCode = 2, detailMessage = failed to execute delete. transaction id 7215554, timeout(ms) 160000, unfinished replicas: 4718319=7345841
```

We do not know the meaning of `4718319=7345841`.

Actually the former is `BackendId` and the latter is `TabletId`.

I'll add an instruction here to help locate the problem quickly. The error message will be 

```sql
ERROR 1064 (HY000): errCode = 2, detailMessage = failed to execute delete. transaction id 7215554, timeout(ms) 160000, unfinished replicas [BackendId=TabletId]: 4718319=7345841
```
2021-07-10 10:13:08 +08:00
290a844e04 [optimize] Optimize bloomfilter performance (#6180)
refactor runtime filter bloomfilter and eliminate some virtual function calls which obtained a performance improvement of about 5%
import block bloom filter, for avx version obtained 40% performance improvement
before: bloomfilter size:default, about 2000W item cost about 1s400ms
after: bloomfilter size:524288, about 2000W item cost about 400ms
2021-07-10 10:12:12 +08:00
01bef4b40d [Load] Add "LOAD WITH HDFS" model, and make hdfs_reader support hdfs ha (#6161)
Support load data from HDFS by using `LOAD WITH HDFS` syntax and read data directly via libhdfs3
2021-07-10 10:11:52 +08:00
814840f826 [refactor] Make Regex more simple and clear (#6141)
1. Remove Redundant character escape ‘\\}’ and ‘\\:’
2. Replace ‘{0,1}’ to ‘?’
2021-07-10 10:10:41 +08:00
65892cec3b [Bug] Create dynamic partition table failed with enable create_history_partition and not specify the start value (#6129)
fix the issue #5995
Add the property "dynamic_partition.history_partition_num" to specify the history partition number when enable create_history_partition to fix the invalid date format value
and add these two properties to docs
2021-07-10 10:10:28 +08:00
e426fbd6be [Planner] Align Date and Datetime by 16 bytes (#6105)
The previous alignment of Doris is up to 8 bytes.
For types with more than 8 bytes, such as Date, Datetime is not aligned.
This PR is mainly to relax the maximum 8-byte limitation
Also, because the data type Decimal v1 no longer exists,
the logic of the 40-byte Decimal v1 is also discarded.
2021-07-10 10:10:04 +08:00
583549d929 help doc error (#6169)
help doc error
2021-07-09 10:20:59 +08:00
Pxl
3812cca4db [Bug]fix the calculation of the "_start_trash_sweep" run interval. (#6177)
* fix the calculation of the _start_trash_sweep run interval
2021-07-09 09:45:44 +08:00
Pxl
0c6726f7cd [Bug] Fix bug of TDisk have wrong static_cast (#6175)
* remove some useless static_cast
2021-07-09 09:42:08 +08:00
cca813a57b [Bug] Fix the bug of bucket shuffle join cause error plan (#6172) 2021-07-08 15:44:39 +08:00
fcd31f29b6 [Bug][Flink] Fix when data null , flink-connector throw NullPointerException (#6165) 2021-07-08 09:55:50 +08:00
8a785ab08b [BUG][Leak] fix new-delete-type-mismatch in StorageBackend (#6157) 2021-07-08 09:55:22 +08:00
40bc3fed53 [Code] basic property related classes supports create, query, read, write, etc. (#6153)
Provides basic property related classes supports create, query, read, write, etc.
Currently, Doris FE mostly uses `if` statement to check properties in SQL. There is a lot of redundancy in the code.
The `PropertySet` class can be used in the analysis phase of `Statement`. The validation and correctness of the input properties are automatic verified. It can simplify the code and improve the readability of the code.

Usage:
1. Create a custom class that implements `SchemaGroup` interface.
2. Define the properties to be used. If it's a required parameter, there is no need to set the default value.
3. According the the requirements, in the logic called `readFromStrMap` and other functions to check and obtain parameters.

Demo:

Class definition

```
public class FileFormat implements PropertySchema.SchemaGroup {
    public static final PropertySchema<FileFormat.Type> FILE_FORMAT_TYPE =
            new PropertySchema.EnumProperty<>("type", FileFormat.Type.class).setDefauleValue(FileFormat.Type.CSV);
    public static final PropertySchema<String> RECORD_DELIMITER =
            new PropertySchema.StringProperty("record_delimiter").setDefauleValue("\n");
    public static final PropertySchema<String> FIELD_DELIMITER =
            new PropertySchema.StringProperty("field_delimiter").setDefauleValue("|");
    public static final PropertySchema<Integer> SKIP_HEADER =
            new PropertySchema.IntProperty("skip_header", true).setMin(0).setDefauleValue(0);

    private static final FileFormat INSTANCE = new FileFormat();

    private ImmutableMap<String, PropertySchema> schemas = PropertySchema.createSchemas(
            FILE_FORMAT_TYPE,
            RECORD_DELIMITER,
            FIELD_DELIMITER,
            SKIP_HEADER);

    public ImmutableMap<String, PropertySchema> getSchemas() {
        return schemas;
    }

    public static FileFormat get() {
        return INSTANCE;
    }
}

```

Usage
```
public class CreateXXXStmt extends DdlStmt {
    private PropertiesSet<FileFormat> analyzedFileFormat = PropertiesSet.empty(FileFormat.get());
    private final Map<String, String> fileFormatOptions;
    ...

    public void analyze(Analyzer analyzer) throws UserException {
        ...
        if (fileFormatOptions != null) {
            try {
                analyzedFileFormat = PropertiesSet.readFromStrMap(FileFormat.get(), fileFormatOptions);
            } catch (IllegalArgumentException e) {
                ...
            }
        }

        // 1. Get property value
        String recordDelimiter = analyzedFileFormat.get(FileFormat.RECORD_DELIMITER)
        // 2. Check the validity of parameters
        PropertiesSet.verifyKey(FileFormat.get(), fileFormatOptions);
        ...
    }

}
```
2021-07-08 09:55:07 +08:00
fb123b2b4b [httpv2] Switch SpringBoot built-in container to jetty (#6149)
Fix the 307 redirect problem
2021-07-08 09:54:28 +08:00
c929a8935a [Feature][Function] support bit_length function (#6140)
support bit_length function like mysql
2021-07-08 09:40:30 +08:00
c33321ff42 [Feature][DataX] Implementation Datax doriswriter plugin (#6107) 2021-07-08 09:33:02 +08:00
e312c0f58f Fix null pointer exception in Routine load (#6163)
The where clause in routine load will also be rewritten.
But there is no connection context.
The PR fix this problem #6162
2021-07-07 10:34:10 +08:00
198ba78595 [Feature] Add update time to show table status (#6117)
Add update time to show table status

```
MySQL [test_query_qa]> show table status;
+----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------+----------+----------------+---------+
| Name     | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time         | Check_time          | Collation | Checksum | Create_options | Comment |
+----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------+----------+----------------+---------+
| bigtable | Doris  |    NULL | NULL       | NULL |           NULL |        NULL |            NULL |         NULL |      NULL |           NULL | 2021-06-29 17:09:28 | 2021-06-29 17:17:28 | 1970-01-01 07:59:59 | utf-8     |     NULL | NULL           | OLAP    |
| test     | Doris  |    NULL | NULL       | NULL |           NULL |        NULL |            NULL |         NULL |      NULL |           NULL | 2021-06-29 17:09:26 | 2021-06-29 17:17:28 | 1970-01-01 07:59:59 | utf-8     |     NULL | NULL           | OLAP    |
| baseall  | Doris  |    NULL | NULL       | NULL |           NULL |        NULL |            NULL |         NULL |      NULL |           NULL | 2021-06-29 17:09:26 | 2021-06-29 17:17:26 | 1970-01-01 07:59:59 | utf-8     |     NULL | NULL           | OLAP    |
+----------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+-----------+----------+----------------+---------+
3 rows in set (0.002 sec)
```
2021-07-07 10:27:14 +08:00
739c0268ff [refactor] Remove decimal v1 related code from code base (#6079)
remove ALL DECIMAL V1 type code , this is a part of #6073
2021-07-07 10:26:32 +08:00
d6e6c7815b [Feature] ADD: show create routine load (#6110)
Add show create routine load
2021-07-04 21:43:25 +08:00
fdecebdd5c [Doc] Fix document title error (#6147) 2021-07-04 21:00:04 +08:00
149def9e42 [Feature] Support RuntimeFilter in Doris (BE Implement) (#6077)
1. support in/bloomfilter/minmax
2. support broadcast/shuffle/bucket shuffle/colocate join
3. opt memory use and cpu cache miss while build runtime filter
4. opt memory use in left semi join (works well on tpcds-95)
2021-07-04 20:59:05 +08:00
4dd2617bd1 [DOC]Doris BE development and debugging environment construction (#6056)
Doris BE development and debugging environment construction

Add installation under ubuntu, dependent installation

Compile on ubuntu 20.04 physical machine, the actual test needs to install these dependencies:
autoconf automake libtool autopoint
2021-07-04 20:58:43 +08:00
f0c5fb9f38 [Bug] Fix bug of NPE caused by the absence of table in replay process. (#6136)
In the previous version, we changed the db level lock to the table level
to reduce lock contention. But this change will cause some metadata playback problems.

Because most operations on a table will only acquire table locks. These operations
may occur at the same time as the operation of dropping the table.
This may cause the metadata operation sequence to be inconsistent with the log replay sequence,
which may cause some problems.
2021-07-02 19:24:13 +08:00
Pxl
6b76b5bcea [refactor] fix machine_name&accesskey leak (#6131)
* fix machine name leak && fix accesskey leak

* Update fe/fe-core/src/test/java/org/apache/doris/backup/BrokerStorageTest.java

Co-authored-by: Zhengguo Yang <780531911@qq.com>

Co-authored-by: pxl <panxiaolei01@baidu.com>
Co-authored-by: Zhengguo Yang <780531911@qq.com>
2021-07-01 09:38:47 +08:00
f01c8e570d [Bug] fix show dynamic partition tables; replicationNum is wrong (#6128) 2021-07-01 09:20:52 +08:00
Pxl
bdafb61ae1 [Docs] Typo fix on CREATE TABLE.md (#6126) 2021-07-01 09:20:12 +08:00
1686d83302 [Doc] Provide precautions for jdk version switching in the compilation document (#6122) 2021-07-01 09:19:26 +08:00
4a5f0f859d [Bug] Add readlock when calling get_rowset_by_version() (#6120) 2021-07-01 09:19:10 +08:00
e43157421d [Doc] Avoid ambiguity (#6106)
Improve the document to avoid ambiguity.
The password use case in the example should be identical to the foregoing(Part 1.3).
2021-07-01 09:18:56 +08:00
c3f4d9ba7f [DOC]In the official website operation manual, add the window function instruction document (#6094) 2021-07-01 09:18:13 +08:00
2a1b2394a2 [Feature] Extract wide common factors (#6083)
This PR mainly adds a rewrite rule 'ExtractCommonFactorsRule'
  used to extract wide common factors in the planning stage for 'Expr'.
The main purpose of this rule is to extract (Range or In) expressions
  that can be combined from each or clause.
E.g:
  Origin expr: (1<a<3 and b in ('a') ) or (2<a<4 and b in ('b'))
  Rewritten expr: (1<a<4 ) and (b in ('a', 'b')) and ((1<a<3 and b in ('a') ) or (2<a<4 and b in ('b')))
Although the range of the wide common factors is larger than the real range,
  the wide common factors only involve a single column, so it can be pushed down to the scan node,
  thereby reducing the amount of scanned data in advance and improving the query speed.

It should be noted that this optimization strategy is not for all scenarios.
When filter rate of the wide common factor is too low,
  the query will consume an extra time to calculate the wide common factors.

So this strategy can be switched by configuring session vairables 'extract_wide_range_expr'.
The default policy is enabled which means this strategy takes effect.
If you encounter unsatisfactory filtering rate, you can set the variable to false.
It will turn off the strategy.

Fixed #6082
2021-07-01 09:17:57 +08:00
b69ebc3ec4 [Extension] Add DataX doriswriter extension directory (#6111)
This CL only add the script for building DataX development environment
2021-06-30 09:55:19 +08:00
6441a4c0ca [Metrics] Add metrics for load average. (#6069)
Added load average metrics to be for monitoring system load.
See iseue #6068 for a detailed explanation.
2021-06-30 09:28:45 +08:00
ce49fa5968 [Bug][DynamicPartition] Take table_id as key of runtimeInfo (#6053)
Co-authored-by: wangxixu <wangxixu@xiaomi.com>
2021-06-30 09:28:26 +08:00
f254870aeb [Optimize] Put _Tuple_ptrs into mempool when RowBatch is initialized (#6036) 2021-06-30 09:27:53 +08:00
28e7d01ef7 [FlinkConnector] Support time interval for flink connector (#5934) 2021-06-30 09:27:12 +08:00
a475d3e3a4 [Bug][Export]ExportJob ErrorMsg is UNKNOWN when job cancelled cause by time out (#5915) 2021-06-30 09:26:48 +08:00
e3899aa3e7 [Metrics] Add tablet count on different status metrics (#5787)
Based on these metrics, we can add alerts to remind
admins whether the cluster is healthy or not.
2021-06-30 09:25:42 +08:00
ba84eacb8c (#6009) fix bucket key distribute error when using spark load (#6087) 2021-06-29 12:30:08 +08:00
b0c7cd4b2a [Docs] Add contact us in README (#6097) 2021-06-29 11:36:12 +08:00
513b1e7358 [Docs] ADD: fe-idea-dev.md add thrift version notice (#6104) 2021-06-29 11:35:55 +08:00