Commit Graph

13073 Commits

Author SHA1 Message Date
fbf7bd6a1d [Bug] Change get load state interface (#4081)
Now, the PathTrie will match wrong interface between
/api/{db}/{table} and /api/{db}/{label}
2020-07-20 15:51:27 +08:00
03cf9b2a24 [Compaction] Add delayed deletion of rowsets function, fix -230 error. (#4039)
Related issue #4017, main changes as follows:
1. Add expired_snapshot_rs_version_map,_expired_snapshot_rs_metas,
2. Add  VersionedRowsetTracker record compacted path version
3. Record path version when rowsets compact
4. In gc process, add expired snapshot rowsets to unused set to remove.
2020-07-19 22:03:59 +08:00
15d9e10a8b [Bug] Fix bug that tablet meta lock twice (#4112)
* [Bug] Fix bug that tablet meta lock twice

The tablet meta load may already be hold before calling
generate_tablet_meta_copy(), so we need provide a unlocked
version of generate_tablet_meta_copy()

* fix typo

Co-authored-by: chenmingyu <chenmingyu@baidu.com>
2020-07-19 21:27:24 +08:00
bb35de2ccb [Bug][Alter] Cancel the alter job if database has been dropped (#4088)
Cancel the alter job in WAITING_TXN state if database has been dropped
Fix: #4087
2020-07-19 21:26:57 +08:00
8500d8b695 [metrics] Use atomic instead of SpinLock for integer metric (#4036) 2020-07-17 11:01:33 +08:00
de3c4b198e Support materialized view extend column in load and insert (#3677)
This commit mainly supports load bitmap_union, hll_union, and count materialized views.

The main changes are as follows:
1、insert stmt support load extend column
2、load stmt support load extend column

Issue : #3344

Co-authored-by: HangyuanLiu <460660956@qq.com>
2020-07-17 10:43:36 +08:00
d07a23ece3 [webserver] Introduce mustache to simplify BE's website render (#4062)
cpp-mustache is a C++ implementation of a Mustache template engine
with support for RapidJSON, and in order to simplify RapidJSON object
building, we introduce class EasyJson from Apache Kudu.
2020-07-16 22:39:51 +08:00
db50c19aad [Thread Resource Leak] Fix thread resource leak after checkpoint catalog destroyed (#4049)
This PR is mainly to fix thread resource leak, and then add some notice
to use newDaemonScheduledThreadPool api in ThreadPoolManager.
2020-07-16 22:38:39 +08:00
3a4a38c2fc [Bug] Fix orc decimal (#4097)
Result may error when ORC load negative decimal value

When load negative decimal which has pre zero , the result is wrong.
eg -0.0014, the orc result is -14(precision ... 0)
2020-07-16 22:36:52 +08:00
1aec46b215 [Bug] Do not choose decommissioned BE in colocate balance For #4102 (#4103)
When set `disable_colocate_balance` to false and set some BE to decommission,
`Coloratebalancer#balanceGroup` will choose decommissioned BE to locate tablets,
which is not right

Fix #4102
2020-07-16 22:34:51 +08:00
a0c19df18c [Website] Redesign the home page of document website (master) (#4069) 2020-07-16 11:36:24 +08:00
5032b7fe7a Support materialized view schema change in bitmap hll and count field [#3739] (#3873)
+ Building the materialized view function for schema_change here based on defineExpr.
+ This is a trick because the current storage layer does not support expression evaluation.
+ count distinct materialized view will set mv_expr with to_bitmap or hll_hash.
+ count materialized view will set mv_expr with count.
+ Support to regenerate historical data when a new materialized view is created in BE。
    + Support to_bitmap function
    + Support hll_hash function
    + Support count(field) function
For #3344
2020-07-16 10:45:15 +08:00
14ac49dde5 Fix be may core dump when linked schema change (#4079)
* fix a core

* Update be/src/olap/rowset/segment_group.cpp
2020-07-15 10:14:42 +08:00
9b0ad66b78 [runtime] Replace the thread pool in FragmentMgr (#4057) 2020-07-15 10:03:48 +08:00
c00326bd85 [Doc] Create CODE_OF_CONDUCT.md (#4070) 2020-07-14 22:28:38 +08:00
5e555bfafb [GithubTemplate] Fix PR template (#4092)
move PR template to .github root.
2020-07-14 10:50:35 +08:00
34d94dfd4e [GithubTemplate] Remove license of Github template file (#4091)
Github template file can not add license.
2020-07-14 10:11:44 +08:00
ecb1bfb22a [Community] Add pull request template (#4072)
add a  pull request template like apache kylin to make our pr more  more formal
2020-07-13 20:55:12 +08:00
da921928d0 [Code]Fix some spell problem (#4066)
fix some spell problem
2020-07-13 20:54:31 +08:00
78a1dea19d Support using B/K/KB/M/MB/G/GB/T/TB/P/PB as unit in session variable exec_mem_limit (#4063)
Support using B/K/KB/M/MB/G/GB/T/TB/P/PB as unit in  session variable exec_mem_limit
2020-07-13 20:54:14 +08:00
2e460f581c [Bug] Support get all rowset meta info in memory from tablet meta url (#4061)
This PR is to fix bug that we cannot get the newest tablet meta info from tablet meta url.
2020-07-13 20:53:51 +08:00
e435e6f9a8 [Bug][Planner]Fix bug of count(*) in MV selector (#4060)
The output columns of query should be collected by all of tupleIds
in BaseTableRef rather than the top tupleIds of query.
The top tupleIds of count(*) is Agg tuple which does not expand the star.

Fixed #4065
2020-07-13 20:53:10 +08:00
cd4fec8ab1 [Bug] Fix core of double delete, when RowBatch call transfer_resource_ownership (#4052)
Resource release should be done by dest RowBatch. 
When we call method transfer_resource_ownership.
if we don't clear the corresponding resources,
which will cause the core problem of double delete.
2020-07-13 20:52:22 +08:00
d7893f0fa7 [Bug]Fix some schema change not work right (#4009)
[Bug]Fix some schema change not work right
This CL mainly fix some schema change to varchar type not work right
because forget to logic check && Add ConvertTypeResolver to add
supported convert type in order to avoid forget logic check
2020-07-11 10:18:29 +08:00
3fcbb646f6 [Bug][Broker] Fix bug that the error exception is not caught when closing the broker writer (#4034)
Broker should return the error status.
Fix #4033
2020-07-10 20:42:39 +08:00
265c26f67d [Doris On ES] Add docvalue limitation for doc_values scan and enable doc_values scan default (#4055) 2020-07-10 18:37:36 +08:00
42cb11901b [webserver] Make BE webserver more pretty (#4050)
Add some CSS and js files, and use boost-table framework to make BE's website more pretty
2020-07-09 21:50:52 +08:00
efef067f2d [Bug] Fix mem_pool npe (#4045)
Fix mem_pool NPE in column reader.
Add a safe allocation method.
2020-07-09 21:50:22 +08:00
ebaa0c7137 [Bug][SQL]Fix predicate pushdown may incorrect when groupby with grouping sets (#4041)
Fixes #4040 
Fix predicate pushdown may incorrect when groupby with grouping sets
2020-07-09 21:49:37 +08:00
d2ab38a5e0 [Feature] Batch update partition's property in one command (#3981)
Support following command.
```
alter table tbl_name modify partition (p1, p2, p3) set ("replication_num" = "3");
```
2020-07-09 21:48:43 +08:00
fafc7e406e [Spill]Fix the problem of mem exec, when analytic eval node need to spill to disk with a low mem limit (#3991)
[Bug] Fix the problem of mem exec, when analytic eval node need to spill to disk with a low mem limit.
And clear_reservations of Analytic node reservation of block manager.
[Running Profile] Add Spilled flag in Running Profile, when Analytic eval node and sort node spill to Disk.
2020-07-09 09:30:22 +08:00
5a27981e49 [Config] Add thrift_client_retry_interval_ms config in be for thrift client to avoid avalanche disaster in fe thrift server (#4022)
This PR is mainly to add  `thrift_client_retry_interval_ms` config in be for thrift client
to avoid avalanche disaster in fe thrift server and fix some typo and some rpc
setting problems at the same time.
2020-07-08 21:07:00 +08:00
fb0ecb70fd [SQL]fix inline view join mysql choose shuffle join bug (#4048)
fix #4047 

#3886 has certain relevance to this case。

the sql : `bigtable t1 join mysqltable t2 join mysqltable t3 on t1.k1 = t3.k1`
1. after reorder:
    t1, t2, t3

2. choose join t1 with t2:  
   t1 join t2 with no conditions, and Doris choose cross join

3. choose join (t1 join on t2) with t3:  
   in old code, the t2 is mysqlTable, so the cardinality is zero,
and "the cross join t1 with t2" 's cardinality is t1.cardinality multiply t2.cardinality, 
for t2 is mysql, so t2.cardinality is zero, and "the cross join t1 with t2" is zero.
t3 is mysqltable, t3's cardinality is zero.

**If two tables need to be joined both are zero,we will choose the shuffle join**

So I change the mysql table ‘s cardinality from 0 to 1,  the cross join's cardinality is not zero.
2020-07-08 20:56:24 +08:00
413d6d2f22 [Bug] Fix core when modifing char to varchar and loading boolean with replace aggregation (#4042)
1. Doris support modify char to varchar. There is a bug when use two-level pointer when converting the date.
2. Boolean can be used as metric value with REPLACE and REPLACE_IF_NOT_NULL aggregation function. The aggregation function should be added into aggregation map.
2020-07-08 11:12:42 +08:00
6d4fd25815 [shell] Fix BE unit test directory not match bug (#4028) 2020-07-08 10:01:42 +08:00
7715a84d4d [Config] Enable some features by default (#4031)
Its time to enable some features by default.

1. Enable FE plugins by setting `plugin_enable=true`
2. Enable dynamic partition by setting `dynamic_partition_enable=true`
3. Enable nio mysql server by setting `mysql_service_nio_enabled=true`

Also modify installation doc, add download link of MySQL client.
2020-07-08 09:59:10 +08:00
b7051d0971 [Config]Make it easier for users to find configuration items needed (#3957)
This PR is to make config items ordered by key and support like predicate for admin show config stmt
2020-07-07 23:12:21 +08:00
ab8851f7aa [webserver] Make BE webserver handle static files (#4021)
Make BE webserver handle static files, e.g. css, js, ico, then we can make
BE website more pretty.
2020-07-07 23:08:29 +08:00
1aa148da7f [Bug]Fix mini load NPE (#4026)
for #4025
2020-07-07 23:08:08 +08:00
c3d9feed75 [Load][Json] Refactor json load logic to make it more reasonable (#4020)
This CL mainly changes:

1. Reorganized the code logic to limit the supported json format to two, and the import behavior is more consistent.
2. Modified the statistical behavior of the number of error rows when loading in json format, so that the error rows can be counted correctly.
3. See `load-json-format.md` to get details of loading json format.
2020-07-07 23:07:28 +08:00
5c42514a8f [Bug][SQL]Fix except node child not order correctly (#4003)
Fixes #3995 
## Why does it happen
When SetOperations encounters that the previous node needs Aggregate, the timing of add AggregationNode is wrong. You should add AggregationNode first before add other children.

## Why doesn't intersect and union have this problem
intersect and union conform to the commutation law, so it doesn't matter if the order is wrong

## Why this problem has not been tested before
In the previous test case, not cover the previous node was not AggregationNode
2020-07-07 23:06:36 +08:00
1cc9e1606f [Doris On ES] Add UT test for all search phase (#4035)
I forget push some UT test in this PR #4012.
Also remove `_cluster/state` resource because DOE does not rely the full ES cluster state meta.
2020-07-07 23:05:02 +08:00
c9a7c373a7 [Bug] Return actual json for ConnectionAction (#4016) 2020-07-07 20:14:55 +08:00
d396408861 Correct typos (#4024) 2020-07-07 13:33:46 +08:00
3ba38e3381 [Doris On ES][Refactor] refactor and enchanment ES sync meta logic (#4012)
After PR #3454 was merged, we should refactor and reorganize some logic for long-term sustainable iteration for Doris On ES.
To facilitate code review,I would divided into this work to multiple PRs (some other WIP work I also need to think carefully)

This PR include:

1. introduce SearchContext for all state we needed
2. divide meta-sync logic into three phase
3. modify some logic processing
4. introduce version detect logic for future using
2020-07-07 09:04:05 +08:00
913b2caac4 [Dynamic Partition]Support set replication number (#3965)
This CL mainly support set replication_num property in dynamic partition
table if dynamic_partition.replication_num is not set, the value is the
same as table's default replication_num.
2020-07-05 16:28:38 +08:00
2e111c05ac [Bug] Fix bug that BE crash when doing alter table task (#4015)
Need to check delete condition first
2020-07-05 16:28:03 +08:00
fa338fb6d9 [Bug][Memroy Leak]Fix bug TransactionState is not clear from idToFinalStatusTransactionState (#4013)
This CL includes:
1. Memory leak because transactionState is not removed.
2. Extracting the clear logic to method to avoid forget.
2020-07-05 16:27:41 +08:00
ba120292ab [ShowIndex] Make Show Index stmt act same as MySQL behavior (#4010)
`SHOW INDEX FROM db2.tbl1 FROM db1;` will be same as
`SHOW INDEX FROM db1.tbl1;`
2020-07-05 16:26:54 +08:00
1fc82cd6e4 [Code Cleanup]Use ThreadPoolManager to manage some native thread (#3997)
Now, FE use ThreadPoolManager to manage and monitor all Thread,
but there are still some threads are not managed. And FE use `Timer` class
to do some scheduler task, but `Timer` class has some problem and is out of date,
It should replace by ScheduledThreadPool.
2020-07-05 16:26:22 +08:00