Commit Graph

1791 Commits

Author SHA1 Message Date
fc02ce8034 tmp_partition_qa1 2020-05-14 15:21:05 +08:00
e69e199df1 fix concurrent_modify_bug 2020-05-09 11:46:04 +08:00
d68c1eb9b2 fix compile 2020-05-07 22:13:32 +08:00
c74253c0dc for qa test6 2020-05-07 17:52:42 +08:00
9e8a060e5b Replace std::tr1::unordered_map with std::unordered_map (#3478) 2020-05-07 10:38:27 +08:00
36f2863574 fix mismatched tags (#3489)
RandomAccessFileOptions, WritableFileOptions, RandomRWFileOptions
defined as a struct but previously declared as a class; this is valid,
but will result in compile warning or error under clang compiler
2020-05-07 09:37:26 +08:00
ca36dc697f [Bug] Fix bug that push down logic error on semi join (#3481)
For SQL like:
```
select * from
join1 left semi join join2
on join1.id = join2.id and join2.id > 1;
```

the predicate `join2.id > 1` can not be pushed down to table join1.
2020-05-07 09:30:30 +08:00
7399997433 [Memory Engine] Add hash index implementation (#3462) 2020-05-06 23:37:25 +08:00
d64704599d [CodeRefactor] vector reserve before push_back (#3463)
1. reserve `SegmentWriter::_column_writers` before writing it
2. remove some condition branchs in SegmentWriter::init
3. fix hard-coded library names in build-thirdpary.sh
2020-05-06 17:16:37 +08:00
5e63629b8b [Decommission] Support NOT dropping BE after decommission (#3461)
Add a new config `drop_backend_after_decommission` in FE. if this config
is false, the BE will not be dropped after finishing decommission operation.

This new config is try to solve the problem described in ISSUE: #3460 .

TODO:
This method will generate a lot of data migration, so it is only a temporary solution.
After that, we should try to solve the problem of data balancing within the BE.

This CL also add the documents of FE and BE configuration.
These documents are incomplete and can be added later.
2020-05-06 17:14:24 +08:00
101628c813 [Bug] Fix bug of predicate pushdown logic (#3475)
When there is subquery in where clause, the query will be rewritten to join operation.
And some auxiliary binary predicates will be generated. These binary predicates
will not go through the ExprRewriteRule, so they are not normalized as
"column to the left and constant to the right" format.

We need to take this case into account so that the `canPushDownPredicate()` judgement
will not throw exception.
2020-05-06 15:15:37 +08:00
dafb356b42 [Bugfix] Fix navbar not showing on mobile clients(#3419) & image relative path problem (#3427) 2020-05-06 11:57:03 +08:00
caa7a07c70 [Query Plan]Support simple transitivity on join predicate pushdown (#3453)
Current implement is very simply and conservative, because our query planner is error-prone.

After we implement the new query planner, we could do this work by `Predicate Equivalence Class` and `PredicatePushDown` rule like presto.
2020-05-04 15:32:19 +08:00
c6822f513a [Code refactor] Remove unnecessary if condition (#3459)
if _opts.conditions is nullptr, the set cids would be empty.
2020-05-04 15:26:52 +08:00
101c7c161d [Bug] Fix bug that double unregister the resource pool in runtime state (#3458)
The resource pool in runtime state will be automatically unregistered
when deconstructing the RuntimeState. So no need to unregister it when
closing the plan fragment executor.
2020-05-04 14:48:57 +08:00
a5922051c9 [Fix] Fix bug that rowset meta is deleted after compaction (#3451)
* [Fix] Fix bug that rowset meta is deleted after compaction

After compaction, the tablet rowset meta will be modified by
adding to new output rowsets and deleting the old input rowsets.
The output version may equals to the input version.

So we should delete the "input" version from _rs_version_map
before adding the "output" version to _rs_version_map. Otherwise,
the new "output" version will be lost in _rs_version_map.
2020-05-04 09:45:25 +08:00
b58b1b3953 [metrics] Make DorisMetrics to be a real singleton (#3417) 2020-05-04 09:20:53 +08:00
d948af6a2f Fix build failure after binutils-dev 2.34 (#3449)
Doris uses some binutils private API, and binutils-dev 2.34 remove them.
This commit makes the code compatible with new versions.
2020-05-03 17:26:22 +08:00
da4d2d2699 [UT] Fix UT bug (#3456)
SSD cool downtime shouldn't be fix time in UT;
2020-05-03 16:24:08 +08:00
a1500eb544 Update doris-on-es.md (#3446) 2020-05-03 12:48:48 +08:00
2cb4027164 Update doris-on-es.md (#3441) 2020-05-03 12:48:19 +08:00
4737aff8fc [Memory Engine] Make Tablet extensible (#3431)
Adding a new storage engine, we need to make an extensible tablet interface, so olap/StorageEngine can support and manage new tablet types.

To start, this commit creates a class BaseTablet and make Tablet and new MemTablet inherit 
this base class, some common fields & methods are moved to BaseTablet class, which fields 
and methods belong to base/old class is not finalized yet, it will change as the project evolves.

Fix #3384
2020-05-01 21:21:09 +08:00
8e21827505 [Bug][AuditPlugin] Fix bug that length of query stmt in audit should less than limit. (#3444)
Use `String.getBytes().length` instead of `String.length()` to get the real byte length of a string.
Fix: #3443 

Also fix the typo of `max_filter_ratio` in audit log plugin.
2020-05-01 21:17:10 +08:00
54da5a491c Fix delete statement doc display not correctly (#3445) 2020-05-01 19:20:00 +08:00
7ef1e2ce5b [Bug] Fix bug that load data to wrong temp partitions (#3422)
When loading data without specifying partition, the data should only be loaded to
formal partitions, not including temp partitions;
2020-04-30 15:11:28 +08:00
d0fe7e4d94 [Profile] Make running profile clearer and more intuitive to improve usability (#3405)
This CL mainly made the following modifications:
    1. Delete Invalid MemoryUsed Counter and Add PeakMemUsage in each exec node and datastreamsender
    2. Add intent in child execnode profile,make it is easily to know the relationship between execnode
    3. Del _is_result_order we not support any more in olap_scan_node.h and olap_scan_node.cpp
    4. Add scan_disk method to olap_scanner to fix the counter _num_disks_accessed_counter
    5. Now we do not use buffer pool to read and write disk, so annotation eadio counter and 
    6. Delete the MemUsed counter in exec node.
2020-04-30 14:57:21 +08:00
c9ec4e8a73 [UT] Fix AlterTest UT failed (#3437) 2020-04-30 14:40:33 +08:00
a6c0d376dd [Thirdparty] Update ORC lib download address (#3440) 2020-04-30 14:16:44 +08:00
25e475898e [Bug] Fix the error result when assert num rows node is used (#3436)
The child.open() function is not called before this commit.

If the assert num rows node has child which process data in open function, the assert num rows node will fetch no data from child. So the result will be empty(incorrect).

This error only appear in inner subquery which has a aggregation function.
For example:

`select * from table where k1=(select k1 from (select avg(k1) from table) a);`

The first level of subquery returns a non-scalar value, so the assert num rows node is needed.
The second level of subquery has a aggregation function, so the child of assert node is aggregate node.

However, if the open stage of the aggregate node is not called, the get next state of aggregate node will return empty set.
So the result is wrong.

Fixed #3435.
2020-04-30 14:15:50 +08:00
beb5b29f66 [Doc] Fix linked file not found (#3434)
the source file of soft link CONTRIBUTING.md is changed, make it to a regular file
2020-04-29 21:56:34 +08:00
73a3c59efb [Bug] Fix bug that help-resource.zip file is missing. (#3423) 2020-04-29 19:25:28 +08:00
74b987f053 [Bug] Fix bug that storage engine bg threads should start after env is ready 2020-04-29 11:21:19 +08:00
332a3acedc [Bug] Fix bug that NPE when get table's storage format (#3401)
the OlapTable's tableProperty field may be null, we should handle it carefully.
This is error-prone, I will try to refactor it later.
Fix #3400
2020-04-29 11:20:25 +08:00
dfaad33b8c [Thirdparty] Upgrade Google Guava lib to 29.0-jre (#3404)
Fix #3403
The new version of Guava has move the `toStringHelper` from `Object` to `MoreObject`.
This CL has passed our test environment, and looks running well.
2020-04-29 10:33:11 +08:00
432965e360 [Enhancement] documents rebuild with Vuepress (#3408) (#3414) 2020-04-29 09:14:31 +08:00
0430714ca9 Remove redundant call function _wait_in_flight_packet() (#3399)
The function `_wait_in_flight_packet` has been called in `_send_cur_batch`.
No need to call twice.
2020-04-27 20:45:25 +08:00
9a934ec9f6 [Load] Add more info in SHOW LOAD result (#3391)
Fix #3390
This CL add more info in `JobDetails` column of `SHOW LOAD` result for Broker Load Job.

For example:
```
{
	"Unfinished backends": {
		"9c3441027ff948a0-8287923329a2b6a7": [10002]
	},
        "All backends": {
		"9c3441027ff948a0-8287923329a2b6a7": [10002, 10004, 10006]
	},
	"ScannedRows": 2390016,
	"TaskNumber": 1,
	"FileNumber": 1,
	"FileSize": 1073741824
}
```

2 newly added keys:

`Unfinished backends` indicates the BE which task on them are not finished.
`All backends` indicates the BE which this job has tasks on it.

One more thing, I pass the Backend Id along with the heartbeat msg from FE to BE, so that BE can
know the Id of themselves.
2020-04-26 21:30:23 +08:00
5ec260887c [Dynamic Partition] Make config dynamic_partition_check_interval_seconds mutable (#3392) 2020-04-25 21:48:21 +08:00
72f3082358 [Metrics] Add some metrics for container size in BE (#3246)
We can observe the workload of BE, and also it's a way to check
whether there is any problem in BE, like some container increase
too large and lead to OOM.

This patch add the following metrics:
```
Name                                   Description
rowset_count_generated_and_in_use      The total count of rowset id generated and in use since BE last start
unused_rowsets_count                   The total count of unused rowset waiting to be GC
broker_count                           The total count of brokers in management
data_stream_receiver_count             The total count of data stream receivers in management
fragment_endpoint_count                The total count of fragment endpoints of data stream in management, should always equal to data_stream_receiver_count
active_scan_context_count              The total count of active scan contexts
plan_fragment_count                    The total count of plan fragments in executing
load_channel_count                     The total count of load channels in management
result_buffer_block_count              The total count of result buffer blocks for queries, each block has a limited queue size (default 1024)
result_block_queue_count               The total count of queues for fragments, each queue has a limited size (default 20, by config::max_memory_sink_batch_count)
routine_load_task_count                The total count of routine load tasks in executing
small_file_cache_count                 The total count of cached small files' digest info
stream_load_pipe_count                 The total count of stream load pipes, each pipe has a limited buffer size (default 1M)
tablet_writer_count                    The total count of tablet writers
brpc_endpoint_stub_count               The total count of brpc endpoints
```
2020-04-25 16:13:39 +08:00
42d14028a0 Use ThreadPoolManager to create threadPool and add some prometheus metrics about pool (#3386) 2020-04-25 15:57:15 +08:00
223ee85636 [Bug]Fix bug that PriorityQueue will throw IllegalArgumentException (#3393) 2020-04-25 15:49:34 +08:00
37fccd53c4 [Tablet] A small refactor on class Tablet (#3339)
There is no functional changes in this patch.
Key refactor points are:
- Remove meaningless return value of functions in class Tablet, and
  also some related functions in other classes
- Allow RowsetGraph::capture_consistent_versions to pass a nullptr
  to the output parameter
- Use CHECK instead of LOG(FATAL) to simplify code
2020-04-24 22:22:26 +08:00
0e66385235 [SQL] Disable some unsupported syntax (#3357)
Disable some syntax when subquery is not binary predicate in case when clause.
2020-04-24 22:01:35 +08:00
4eb27bc7e3 [Profile] Make running profile clearer and more intuitive to improve usability (#3365) (#3383)
This CL mainly made the following modifications:
1. Delete Invalid method in Running Profile Class.
2. Move Memlimit Counter from blockmgr to fragment and add PeakMemUsage Counter
3. Fix the bug of buffer pool memlimit counter
4. Call compute_time_in_profile() before pretty_print() to show the _local_time_percent without child running profile
5. Add TransferThread ThreadToken count in AveThreadToken Counter
2020-04-24 21:38:55 +08:00
07a9401f82 Forbidden correlated having clause (#3378)
1. The correlated slot ref should be bound by the agg tuple of outer query.
However, the correlated having clause can not be analyzed correctly so the result is incorrect.

For example: 

```
SELECT k1 FROM test GROUP BY k1 
HAVING EXISTS(SELECT k1 FROM baseall GROUP BY k1 HAVING SUM(test.k1) = k1);
```

The correlated predicate is not executed.

2. The limit offset should also be rewritten when there is subquery in having clause.

For example: 

```
select k1, count(*) cnt from test group by k1 having k1 in
(select k1 from baseall order by k1 limit 2) order by k1 limit 5 offset 3;
```

The new stmt should has a limit element with offset.
2020-04-24 21:34:40 +08:00
7715deed4e [Doc] Add download link for 0.12.0 release (#3388) 2020-04-24 21:04:19 +08:00
09eb40e356 [New Stmt] Alter replication number for table (#3360)
This CL add new command to set replication number of table in one time.
```
alter table test_tbl set ("replication_num" = "3");
```
It changes replication num of a unpartitioned table.

and

```
alter table test_tbl set ("default.replication_num" = "3");
```

It changes default replication num of the specified table.
2020-04-23 21:58:09 +08:00
a58bc1957e Fix expect may produce incorrect values (#3381) 2020-04-23 09:35:41 +08:00
ad6698cd31 [Performance] Use Google/CCTZ to replace boost at timezone function (#3300)
NOTICE: the thirdparty dependency need to upgrade to add libcctz.
2020-04-23 09:26:04 +08:00
d854a79878 [Bug] isQuery field should be reset at the beginning of query execution (#3374)
If not reset, all queries comes from same session will have save isQuery field value.
This bug will cause all entries in fe.audit.log has same IsQuery=true.

This CL also fix another bug:
The resolved IPs of domain of a user should not appear in other user's white list. Fix #3380
2020-04-23 09:00:47 +08:00