Commit Graph

1389 Commits

Author SHA1 Message Date
alesapin
f9dd4cc98d Merge branch 'control_ttl_merges_in_pool' into recompression_in_background 2020-09-04 14:32:25 +03:00
alesapin
e42d0f60da Fix several bugs 2020-09-04 14:27:27 +03:00
alesapin
4079636f81 Merge 2020-09-04 13:52:51 +03:00
alesapin
6f5ba4d8e5 Fix ya.make 2020-09-04 13:31:29 +03:00
alesapin
69b31ab90d More comments 2020-09-04 13:29:55 +03:00
alesapin
82c56349a5 Some comments 2020-09-04 13:08:09 +03:00
alesapin
61ecaebcb1 Simplify settings for TTL merges 2020-09-04 09:55:19 +03:00
alesapin
0dab4d9485 Merge branch 'fix_select_parts_for_merge' into control_ttl_merges_in_pool 2020-09-03 17:41:23 +03:00
alesapin
bd24c3a059 Fix build useless binary 2020-09-03 17:38:56 +03:00
alesapin
15a02321bf Merge branch 'fix_select_parts_for_merge' into control_ttl_merges_in_pool 2020-09-03 17:16:29 +03:00
alesapin
55adb6f9f2
Update src/Storages/MergeTree/MergeSelector.h
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2020-09-03 16:55:34 +03:00
alesapin
e48e4309b2 Better names 2020-09-03 16:29:18 +03:00
alesapin
565555e55c Fix bug in parts selection 2020-09-03 16:04:28 +03:00
alesapin
13248a744b Fix bug in parts selection 2020-09-03 16:02:24 +03:00
alesapin
f4c7ff0376 Add fixed size of Merge TTLS 2020-09-03 16:00:13 +03:00
alesapin
aa47d0aabc Merge branch 'apply_ttl_if_not_calculated' into recompression_in_background 2020-09-03 12:07:03 +03:00
alesapin
acc0ee0657 Apply TTL if it's not calculated for part 2020-09-03 11:59:41 +03:00
alesapin
dcbddbb8d0 Add recompression ttls tests and fix bugs 2020-09-02 19:15:41 +03:00
alexey-milovidov
8e2fba5be1
Merge pull request #12567 from amosbird/fmi
table function view
2020-09-02 17:07:57 +03:00
alesapin
128cb7ce22 Don't select already selected parts 2020-09-02 15:16:12 +03:00
alesapin
aac466ab1c Merge branch 'better_ttl_merges_selection' into recompression_in_background 2020-09-02 13:30:04 +03:00
alesapin
fbb37c37df Simplier interface 2020-09-02 11:28:46 +03:00
alesapin
b08056fa8c Better selection of Merges with TTL 2020-09-02 11:18:50 +03:00
Amos Bird
6bd753d85d
TableFunction view. 2020-09-02 16:02:10 +08:00
bharatnc
f0d1c6c794 Merge remote-tracking branch 'upstream/master' into ncb/fix-alter-live-lock 2020-09-01 09:06:10 -07:00
alesapin
c37a19f7b0 Better 2020-09-01 14:23:38 +03:00
alesapin
f0dc5a3085 First working test 2020-09-01 13:49:53 +03:00
alesapin
b751319f9e Merge branch 'master' into recompression_in_background 2020-09-01 10:31:10 +03:00
alesapin
05b10048a6
Merge pull request #14116 from ClickHouse/parts_default_compression
Save parts default compression
2020-09-01 09:43:42 +03:00
alesapin
e28b477f79
Merge pull request #14263 from bharatnc/ncb/disallow-codec-for-alias
Disallow codec for ALIAS columns types
2020-09-01 09:42:53 +03:00
bharatnc
c3dd968931 fix ALTER LIVE VIEW lock issue
This PR fixes a lock issue that happens while executing
`ALTER LIVE VIEW` query with the `REFRESH` command that
results in a exception. The problem is that lock is currently
being acquired in `InterpreterALterQuery.cpp`
in the `InterpreterAlterQuery::execute()` method and lock
is again being reacquired in `StorageLiveView.cpp` in the
` StorageLiveView::refresh` method. This removes that extra
lock.

Before fix:

```sql
--create table

CREATE TABLE test0 (
    c0 UInt64
) ENGINE = MergeTree() PARTITION BY c0 ORDER BY c0;

-- enable experimental_live_view

:) SET allow_experimental_live_view=1

-- create live view;

:) CREATE LIVE VIEW live1 AS SELECT * FROM table0;

-- alter live view results in exception

:) ALTER LIVE VIEW live1 REFRESH;

...
...

Received exception from server (version 20.8.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: RWLockImpl::getLock(): RWLock is already locked in exclusive mode.

```

After fix:

```sql
:)  ALTER LIVE VIEW live1 REFRESH;

ALTER LIVE VIEW live1
    REFRESH

Ok.

0 rows in set. Elapsed: 0.016 sec.
```
2020-08-31 22:17:58 -07:00
robot-clickhouse
e2fa0eae2f Auto version update to [20.9.1.1] [54439] 2020-08-31 23:07:41 +03:00
alesapin
46f833b7df Some changes 2020-08-31 22:50:42 +03:00
bharatnc
c377c228ef fix tests 2020-08-31 10:22:53 -07:00
bharatnc
c4e235b000 Merge remote-tracking branch 'upstream/master' into ncb/disallow-codec-for-alias 2020-08-31 09:01:07 -07:00
bharatnc
caed8cd474 change error code to BAD_ARGUMENTS (36) 2020-08-31 09:00:32 -07:00
Alexander Kuzmenkov
bc8765d5ad
Merge pull request #14095 from azat/DistributedFilesToInsert-fix
Fix DistributedFilesToInsert metric (zeroed when it should not)
2020-08-31 18:58:30 +03:00
alexey-milovidov
f5a38fa78d
Merge pull request #14203 from donge/master
fix issue #14202
2020-08-31 17:48:39 +03:00
alesapin
b20a0bc254 Add recompression flag in ReplicatedEntry 2020-08-31 16:42:42 +03:00
alesapin
067eb4599d Fix empty columns case 2020-08-31 16:39:27 +03:00
alesapin
adc18f4d3f Write with recompression TTL 2020-08-31 16:29:31 +03:00
alesapin
42c210fcba Recompress TTLs in memory metadata 2020-08-31 15:12:51 +03:00
alesapin
4834bed35b Add recompression TTL parser 2020-08-31 14:35:53 +03:00
alesapin
034f1a895d Merge branch 'master' into recompression_in_background 2020-08-31 11:10:14 +03:00
alesapin
5b0822902b
Merge pull request #14155 from amosbird/fzk
Allow FETCH PARTITION from other zookeepers
2020-08-31 09:54:51 +03:00
bharatnc
5c83b09a2f disallow CODEC setting for column type ALIAS
This commit adds checks in place during table creation
and updates to ensure that we don't allow `CODEC` for
ALIAS (`default_type` column) like:

```sql
CREATE TABLE compression_codec_on_alias
(
    `c0` ALIAS c1 CODEC(ZSTD),
    `c1` UInt64
)
ENGINE = MergeTree()
PARTITION BY c0
ORDER BY c1;
```

After these safeguards in place, when trying to create/update column
codec, we will get excaptions like this:

```sql

-- create

CREATE TABLE compression_codec_on_alias
(
    `c0` ALIAS c1 CODEC(ZSTD),
    `c1` UInt64
)
ENGINE = MergeTree()
PARTITION BY c0
ORDER BY c1

Received exception from server (version 20.8.1):
Code: 377. DB::Exception: Received from localhost:9000. DB::Exception: Cannot specify codec for column type ALIAS.

0 rows in set. Elapsed: 0.006 sec.

-- modify

ALTER TABLE compression_codec_on_alias
    ADD COLUMN `c3` ALIAS c2 CODEC(ZSTD) AFTER c2

Received exception from server (version 20.8.1):
Code: 377. DB::Exception: Received from localhost:9000. DB::Exception: Cannot specify codec for column type ALIAS.

0 rows in set. Elapsed: 0.005 sec.

```
2020-08-30 23:45:53 -07:00
alexey-milovidov
b1efc5df01
Merge pull request #14225 from amosbird/bf1
Fix bug in mark inclusion search.
2020-08-30 02:58:22 +03:00
alesapin
2d33a4029b
Merge pull request #14220 from ClickHouse/remove_redundant_flag
Disable force TTL on optimize final
2020-08-29 10:40:36 +03:00
Amos Bird
591a4d60d4
Fix bug in mark inclusion search. 2020-08-29 09:46:46 +08:00
alesapin
ebc163c924 Merge branch 'master' into parts_default_compression 2020-08-28 23:11:42 +03:00