Commit Graph

974 Commits

Author SHA1 Message Date
e8da855cd2 Support setting timezone for stream load and routine load (#1831) 2019-09-20 07:55:05 +08:00
7bf02d0ae7 Fix bug that routine load may mistakenly skipped some data (#1832)
Reproduce:
1. start a routine load, send a routine load task to BE
2. BE executes task successfully and commit to FE.
3. Commit request failed on FE because database is renamed(throw db not found exception)
4. After commit failed, BE will send rollback request to FE.
5. FE receive this rollback request and mistakenly update the routine load progress,
   because the number of loaded rows in this rollback request's attachment is larger than 0
2019-09-20 07:54:11 +08:00
720808fda5 Remove config::max_file_descriptor_number (#1833) 2019-09-20 07:50:57 +08:00
315f762523 Seek block when starts a ScanKey (#1828)
In Doris, one block has 1024 rows.
1. If the previous ScanKey scan rows multiple blocks,
   and also the final block has 1024 rows just right.
2. The current ScanKey scan rows with number less than one block.
Under the two conditions, if not seek block, the position of prefix shortkey columns is wrong.
2019-09-19 20:08:03 +08:00
aaabf97471 Split channel close operation into two phase (#1830)
In this change, channel close is finished into two phases. So we can
close channels parallel, which can make query faster.
2019-09-19 18:14:30 +08:00
17e52a4bac Improve LRUCache to get better performance (#1826)
In this CL, I move the entry's deleter out of LRUCache's mutex block,
which can let others access this cache without waiting free cache entry.
2019-09-19 17:37:02 +08:00
e516eba940 Remove the "author" tag (#1829) 2019-09-19 16:59:08 +08:00
d1676c3c3d Check file descriptor number is larger than 65536 upon start (#1819) 2019-09-19 12:48:36 +08:00
e70e48c01e Add a ALTER operation to change distribution type from RANDOM to HASH (#1823)
Random distribution is no longer supported since version 0.9.
And we need a way to convert the random distribution to hash distribution.

    ALTER TABLE db.tbl SET ("distribution_type" = "hash");
2019-09-18 14:16:26 +08:00
714dca8699 Support table comment and column comment for view (#1799) 2019-09-18 09:45:28 +08:00
3f63bde5cb Fix 'Invalid Column Name' error when loading parquet file (#1820) 2019-09-17 21:17:55 +08:00
c4e28f0d13 Update FeConstants meta version to VERSION_62 (#1822)
This should be modified along with commit a232a56c0
2019-09-17 17:30:22 +08:00
dc813e6c61 Limit the max version to cumulative compaction (#1813) 2019-09-17 14:10:05 +08:00
054a3f48bc Add where expr in broker load (#1812)
The where predicate in broker load is responsible for filtering transformed data.
The docs of help and operator has been changed.
2019-09-17 11:32:40 +08:00
ede51da777 Resolve reduce/reduce conflict in our syntax (#1811) 2019-09-16 20:25:05 +08:00
973eff26cd Fix tablet meta tool command argument bug (#1810) 2019-09-16 17:40:23 +08:00
a232a56c06 Add parallel_exchange_instance_num to set parallel after exchange (#1788) 2019-09-16 16:41:14 +08:00
86feddb5d7 Fix bug that dead lock may happen when drop table during alter table process (#1800)
the cancel() function will try get database's write lock, while its caller may already
hold the database's read lock.
2019-09-16 00:12:00 +08:00
dcea6daf4f Fix Cluster meta write error (#1802) 2019-09-13 22:06:55 +08:00
11eafe524f Add ChunkAllocator to accelerate chunk allocation (#1792)
I add ChunkAllocator in this CL to put unused memory chunk to a chunk
pool other than return it to system allocator. Now we only change
MemPool's chunk allocation and free to this.

And two configuration are introduduced too. 'chunk_reserved_bytes_limit'
is the limit of how many bytes this chunk pool can reserve in total and
its default value is 2147483648(2GB). 'use_mmap_allocate_chunk': if
chunk is allocated via mmap and default value is false.

And in my test case with default configuration a simple like
"select * from table limit 10", this can improve throughput from 280 QPS
to to 650 QPS. And when I config 'chunk_reserved_bytes_limit' to 0,
which means this is disabled, the throughput is the same with origin's.
2019-09-13 08:27:24 +08:00
9aa2045987 Refactor alter job (#1695) 2019-09-12 16:31:29 +08:00
dad4def708 Support estimate size for v2 segment writer (#1787) 2019-09-12 15:15:39 +08:00
f58a222da7 Fix bug that the calculation of disk usage percent is wrong (#1791)
This bug may cause unable to load data
2019-09-12 14:37:20 +08:00
c354f30767 Fix mistake in docs (#1796) 2019-09-12 14:15:06 +08:00
348e2129b7 Initialize tablet uid not using default constructor for performance reason (#1795) 2019-09-12 12:59:16 +08:00
afa9b6ecab Add meta store service thrift definition (#1783) 2019-09-12 10:30:49 +08:00
a85ffa1c2a Fix FE log error (#1785) 2019-09-11 16:13:34 +08:00
b327643132 Fix bug that failed to limit the mem usage of HLL column when loading (#1778)
Should use arena to allocate mem for HyperLogLog column.
2019-09-11 10:20:46 +08:00
5a12a1d7df Fix compile error (#1780) 2019-09-10 23:48:42 +08:00
dcdfc5faf2 Update .gitignore: ignore cmake dir (#1779) 2019-09-10 21:40:11 +08:00
bf373758b2 Make CpuInfo::get_current_core work (#1773) 2019-09-10 19:35:55 +08:00
235cdb0ecd Commit kafka offset (#1734)
Commit kafka offset in routine load

Kafka will decide whether to delete data based on whether all consumer group is commit offset or not. If there is no commit offset, the kafka server disk may be full
2019-09-10 14:27:06 +08:00
40a11c41a9 Fix BE crash when schema changing with HLL column (#1772) 2019-09-10 13:59:38 +08:00
5653822298 Writer magic number in footer instead of header (#1771) 2019-09-10 09:54:13 +08:00
044489b92f Optimize some kinds of load jobs (#1762)
1. Support specifying label to Insert Into stmt.

    INSERT INTO tbl1 WITH LABEL label1 ...;

2. Return job' state corresponding to the existing label in result of stream load.

    ...
    "Status": "Label Already Exists",
    "ExistingJobStatus": "FINISHED"
    ...

3. Return the recent 2000 transactions in SHOW PROC '/transactions'
2019-09-09 22:11:12 +08:00
8b663bf416 Fix bug: unknown column from the inline view (#1770)
Revert code from PR-1617. The column who belongs to inline view need to be initialized by alias.
2019-09-09 20:57:42 +08:00
0f44ce99ce Fix segment v2 comment (#1769) 2019-09-09 18:26:48 +08:00
cd5cfea5cc Encapsulate HLL logic (#1756) 2019-09-09 15:52:10 +08:00
a349409838 Move compare from RowCursor to row (#1764) 2019-09-09 14:51:13 +08:00
ca23b7a511 Should create init rowset for alter task v2 (#1767) 2019-09-09 13:59:19 +08:00
5acdeee4d2 Assign schema_size from other Schema (#1768) 2019-09-09 13:50:14 +08:00
fd2937360c Get rid of external_sorting when rowsets have already been filtered (#1760) 2019-09-08 21:31:12 +08:00
b85cb0071b Bug-fix: error result of union stmt (#1758)
ISSUES-1725: The result of union stmt whose child is outer join stmt is incorrect.

Example:
sql: (select k1 from empty) union all (select b.k1 k1 from left_table a left join empty  b on a.k2 = b.k2);
context: the empty table has no data.
error result: 0
expect result: null

Reason:
The judgment (columns k1 who belongs to union tuple is nullable ) is incorrect.
It could not be determined by slot attribute of children when the slot is produced by the outer join.
The slot A is not nullable while the result of outer join is nullable which is same as slot A.
So, the judgment needs to consider if the slot is come from the outer join.
2019-09-08 21:26:31 +08:00
f23ac0eadd Planner support push down predicates past agg, win and sort (#1471) 2019-09-08 09:30:46 +08:00
2f52ae7988 Add PreAgg Hint (#1617)
eg:
SELECT xxx FROM tbl /*+ PREAGGOPEN */ 
This will open pre-aggregation forcibly for the specified table
2019-09-06 19:47:18 +08:00
981e0feb99 Check rowset is useful atomicly (#1750)
* Check rowset is useful atomicly

* Only release rowset id when it is added to unused rowset

* remove release rowset id when save rowset meta
2019-09-06 17:21:42 +08:00
65dcabf1df Use crc32c checksum for segment v2 (#1753) 2019-09-06 15:23:57 +08:00
54fd3652e6 Fix bug in BetaRowsetReader which results in empty result (#1754) 2019-09-06 15:07:23 +08:00
da69812f65 Fix compile error (#1749) 2019-09-05 22:30:41 +08:00
3f22238012 Add check for to_bitmap function argument (#1747) 2019-09-05 18:11:38 +08:00