Commit Graph

38 Commits

Author SHA1 Message Date
Vitaly Baranov
70b0fe88b1
Merge pull request #14604 from vitlibar/no-detach-threads-2
Use join() instead of detach() for threads #2
2020-09-12 02:07:46 +03:00
Vitaly Baranov
2a9ab48279 Use join() instead of detach() for the no_users_thread in StorageLiveView. 2020-09-09 22:39:27 +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
Nikolai Kochetov
9b67cd9faf Merge branch 'master' into refactor-pipes-3 2020-08-10 10:50:17 +03:00
Alexey Milovidov
12f66fa82c Fix 99% of typos 2020-08-08 04:01:47 +03:00
Nikolai Kochetov
20e63d2271 Refactor Pipe [part 6] 2020-08-06 15:24:05 +03:00
Nikolai Kochetov
e411916bde Refactor Pipe [part 1]. 2020-08-03 14:33:11 +03:00
Vitaliy Zakaznikov
370dd3396b Fixing clang build. 2020-07-15 16:18:53 +02:00
Vitaliy Zakaznikov
560151f6cd * Fix bug in StorageLiveView.cpp
* Fixing synchronization of the first insert in live view tests
2020-07-15 13:24:33 +02:00
alesapin
c9fa5d2ec3 Better naming 2020-06-19 18:39:41 +03:00
alesapin
009977c20c Fix locks 2020-06-18 22:45:37 +03:00
alesapin
d79982f497 Better locks in Storages 2020-06-18 19:10:47 +03:00
alesapin
dffdece350 getColumns in StorageInMemoryMetadta (only compilable) 2020-06-17 19:39:58 +03:00
alesapin
eca6e9087e Fix race condition 2020-06-17 14:52:19 +03:00
alesapin
36ba0192df Metadata in read and write methods of IStorage 2020-06-15 22:08:58 +03:00
alesapin
af2fe2ba55 Compilable setColumns, setConstraints, setIndices 2020-06-15 19:55:33 +03:00
alesapin
4f398b5dea Merge remote-tracking branch 'origin/master' into consistent_metadata4 2020-06-09 23:53:38 +03:00
Vitaliy Zakaznikov
5fe67c4292 * Removing supportsPrewhere() from StorageLiveView.h as it is not valid.
* Updating test to check using PREWHERE in query against live view table.
* Updating test to check using PREWHERE in the stored query against the table that does
  not support PREWHWERE.
2020-06-08 13:12:40 +02:00
Vitaliy Zakaznikov
75c97ca82a Adding support for PREWHERE in live view tables. 2020-06-08 00:19:23 +02:00
alesapin
5bc7f67e61 Better metadata for select query and renames 2020-06-05 14:54:54 +03:00
Nikolai Kochetov
3a0acb00c1 Remove some streams. 2020-06-01 19:31:06 +03:00
alexey-milovidov
3eea042d16
Merge pull request #11243 from ClickHouse/remove-experimental-use-processors-flag-4
Remove some code.
2020-05-30 21:05:14 +03:00
Alexander Tokmakov
c071e0a473 add context to DatabaseCatalog methods 2020-05-29 02:01:18 +03:00
Nikolai Kochetov
ea3f638b30 Try fix tests. 2020-05-28 17:11:36 +03:00
Alexander Tokmakov
5ffb7372af fix livelock with watch queries and database atomic 2020-05-12 21:10:10 +03:00
alesapin
f981649213 Fix pushing to views stream and refactor virtuals 2020-04-28 13:38:57 +03:00
alesapin
4badd0fd28 Better code 2020-04-27 20:46:51 +03:00
alesapin
18c550df15 Better virtuals logic 2020-04-27 16:55:30 +03:00
alesapin
2829774105 Merge branch 'master' into refactor_istorage 2020-04-27 15:34:21 +03:00
alesapin
dc2dd77d2e Remove redundant overrides from IStorage 2020-04-24 12:20:09 +03:00
Alexander Tokmakov
5e6d4b9449 Merge branch 'master' into database_atomic 2020-04-12 16:35:44 +03:00
Alexander Kazakov
497df3086f Merge branch 'master' into timed_rwlock
Change-Id: I620bfde2121ff013773b001d514b40b1e796a58b
2020-04-10 11:38:20 +03:00
Alexander Kazakov
26dd6140b2 Added new config settings to control timeouts
* "lock_acquire_timeout" controls for how long a query will continue to
acquire each lock on its argument tables
 * "lock_acquire_timeout_for_background_operations" is a per-table
setting for storages of *MergeTree family
2020-04-09 21:10:27 +03:00
Alexander Tokmakov
dd1590830b Merge branch 'master' into database_atomic 2020-04-08 22:00:46 +03:00
Alexander Tokmakov
a2101c9b1c better code 2020-04-07 02:22:44 +03:00
Alexander Tokmakov
08bae4668d Merge branch 'master' into database_atomic 2020-04-06 16:18:07 +03:00
Azat Khuzhin
1232760f78 Fix Distributed-over-Distributed when nested table has only one shard 2020-04-04 13:47:35 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00