Commit Graph

58611 Commits

Author SHA1 Message Date
Kseniia Sumarokova
08cb02c872
Merge pull request #21416 from excitoon-favorites/caseinsensitivecompression
Case-insensitive compression methods for table functions
2021-03-04 17:37:28 +03:00
filimonov
bd8c3eb117
avoid race in librdkafka
see https://github.com/edenhill/librdkafka/issues/3279
2021-03-04 15:01:10 +01:00
Maksim Kita
1eb1f3028c FunctionsExternalDictionaries safe case to ColumnTuple 2021-03-04 16:55:05 +03:00
alesapin
39de525c74 Simplify config 2021-03-04 16:49:22 +03:00
Ivan
218542589a
Merge pull request #19673 from azat/distributed-bytes_to_throw_insert
Add ability to throttle INSERT into Distributed
2021-03-04 13:28:23 +03:00
Nikolai Kochetov
a195e783d2 Try fix perftests. 2021-03-04 13:25:49 +03:00
DIAOZHAFENG
35aaac84b8
Update in.md 2021-03-04 16:58:09 +08:00
DIAOZHAFENG
587014217c
Update in.md
update untranslated line
2021-03-04 16:47:59 +08:00
Nikolai Kochetov
b985e33294
Merge pull request #21434 from azat/dist-query-SIGSEGV-on-exception-fix
Fix SIGSEGV for distributed queries on failures
2021-03-04 11:32:17 +03:00
alesapin
d28463d70b Use path as default prefix for coordination logs 2021-03-04 11:29:24 +03:00
olgarev
134eaa55e5
DOCSUP-6258: FAQ edit and translate (#21109)
Co-authored-by: ana-uvarova <ana-uvarova@yandex-team.ru>
Co-authored-by: AnaUvarova <64017504+AnaUvarova@users.noreply.github.com>
Co-authored-by: vdimir <vdimir@yandex-team.ru>
Co-authored-by: Olga Revyakina <revolg@yandex-team.ru>
Co-authored-by: Anna <42538400+adevyatova@users.noreply.github.com>
2021-03-04 10:50:14 +03:00
Alexey Milovidov
66f495b690 Fix build 2021-03-04 06:49:46 +03:00
Alexey Milovidov
9416f59014 Some progress on tests 2021-03-04 06:48:24 +03:00
Alexey Milovidov
ed492ccf5d Fix Africa/Juba 2021-03-04 05:36:36 +03:00
Alexey Milovidov
b9a8509f79 Adjustments 2021-03-04 05:18:17 +03:00
Alexey Milovidov
6dc21cd098 Remove discrepances 2021-03-04 03:48:37 +03:00
Alexey Milovidov
31010624d6 Attempt to simplify code 2021-03-04 03:35:23 +03:00
Alexey Milovidov
9f3760e1e3 Bad filename 2021-03-04 03:18:48 +03:00
Alexey Milovidov
7f1ae506fc The code is too complicated 2021-03-04 03:11:40 +03:00
Alexey Milovidov
4f08539754 Remove strange code 2021-03-04 03:01:08 +03:00
Alexey Milovidov
78cc708816 Fix bad whitespaces in test 2021-03-04 02:15:33 +03:00
Alexey Milovidov
3eb3830dd8 Remove trash 2021-03-04 02:13:49 +03:00
Alexey Milovidov
1096fc328a Make some tests automated 2021-03-04 02:11:27 +03:00
Alexey Milovidov
ffc39574f1 Removed very old example (for jemalloc performance regression) 2021-03-04 02:04:01 +03:00
Alexey Milovidov
329074bd02 Fix test 2021-03-04 01:55:56 +03:00
Alexey Milovidov
2632b568ae Move tests to appropriate place 2021-03-04 01:34:30 +03:00
Alexey Milovidov
51d51e4748 Return private 2021-03-04 00:44:58 +03:00
Azat Khuzhin
e858dae187 Fix SIGSEGV for distributed queries on failures
Since after pull(), cancel() will be called, and this will lead to
SIGSEGV, since there is no exception, but has_exception was not reseted
in pull()
2021-03-04 00:42:49 +03:00
Alexey Milovidov
fdc00beb77 Whitespaces 2021-03-03 23:56:59 +03:00
Alexey Milovidov
6f5877abdf Fix build after merge with master 2021-03-03 23:53:52 +03:00
Azat Khuzhin
e7948819f9 Fix ParsingException::displayText()
Before it was silently try-catched for messages with additional {}, and
it is very easy to trigger, i.e.:

    SELECT toDateTime(format('{}-{}-01 00:00:00', '2021', '1'))

Will print:

    Code: 41. DB::Exception: Received from localhost:9000. DB::Exception: Cannot parse datetime 2021-1-01 00:00:00{}: Cannot parse DateTime from String: while executing 'FUNCTION toDateTime(format('{}-{}-01 00:00:00', '2021', '1') :: 3) -> toDateTime(format('{}-{}-01 00:00:00', '2021', '1')) DateTime : 2'.
2021-03-03 23:44:51 +03:00
Alexey Milovidov
4e8239e098 Merge branch 'master' into DateTime64_extended_range 2021-03-03 23:43:20 +03:00
Alexey Milovidov
b1b3db09d7 Remove commented out code 2021-03-03 23:34:15 +03:00
Azat Khuzhin
79ed35876e DirectoryMonitor: Remove const qualifier and lots of mutable qualifiers 2021-03-03 23:30:24 +03:00
Azat Khuzhin
45ee650e26 Distributed: check for bytes_to_throw/delay_insert only before INSERT
Before it was checked for each block.
2021-03-03 23:30:24 +03:00
Azat Khuzhin
a57c646467 Fix 01293_system_distribution_queue flakiness 2021-03-03 23:30:24 +03:00
Azat Khuzhin
9a4f469a38 Fix 00753_distributed_system_columns_and_system_tables flakiness 2021-03-03 23:30:24 +03:00
Azat Khuzhin
6965ac26c3 Distributed: Add ability to delay/throttle INSERT until pending data will be reduced
Add two new settings for the Distributed engine:
- bytes_to_delay_insert
- max_delay_to_insert

If at the beginning of INSERT there will be too much pending data, more
then bytes_to_delay_insert, then the INSERT will wait until it will be
shrinked, and not more then max_delay_to_insert seconds.

If after this there will be still too much pending, it will throw an
exception.

Also new profile events were added (by analogy to the MergeTree):
- DistributedDelayedInserts (although you can use system.errors instead
  of this, but still)
- DistributedRejectedInserts
- DistributedDelayedInsertsMilliseconds
2021-03-03 23:30:23 +03:00
Azat Khuzhin
15f7459cae Distributed/DirectoryMonitor: protect metric_pending_files with metrics_lock
Since there is local value, that is not atomic, anyway we already have
lock for metrics, so it is fine.
2021-03-03 23:30:03 +03:00
Azat Khuzhin
cabe4ca1bb tests: split 00753_system_columns_and_system_tables (to disable Distributed part for arcadia) 2021-03-03 23:30:03 +03:00
Azat Khuzhin
3102835d56 tests: Use total_bytes>0 for Distributed engine in 00753_system_columns_and_system_tables 2021-03-03 23:30:03 +03:00
Azat Khuzhin
70049db143 CurrentMetrics/Increment: Introduce add() 2021-03-03 23:30:03 +03:00
Azat Khuzhin
017c054a35 Distributed/DirectoryMonitor: Use std::lock_guard over std::unique_lock
It is more natural, since we do not need lazy locking.
2021-03-03 23:30:03 +03:00
Azat Khuzhin
fcf49a4914 Distributed: Calculate counters for async INSERT at INSERT time
Previous patch fixes the inaccuracy, but it's done using iterating over
directory on each request (to system.distribution_queue or to check
bytes_to_throw_insert), and like previous patch alredy stated, it may
have pretty huge overhead (especially when you have lots of distributed
files pending).

This patch remove that recalculation (but it will still be done, and
if there is different, there will be a log message), and replace it with
proper account at INSERT time (and after file has been sent, or marked
as broken).
2021-03-03 23:30:03 +03:00
Azat Khuzhin
b43046ba06 Distributed: More accurate distribution_queue counters
So now system.distribution_queue will show accurate statistics, so tests
does not requires sleep anymore.

But note that with too much distributed pending this will iterate over
all directories.
2021-03-03 23:30:03 +03:00
Azat Khuzhin
b5a5778589 Distributed: Add ability to limit amount of pending bytes for async INSERT
Right now with distributed_directory_monitor_batch_inserts=1 and
insert_distributed_sync=0 INSERT into Distributed table will store
blocks that should be sent to remote (and in case of
prefer_localhost_replica=0 to the localhost too) on the local
filesystem, and sent it in background.

However there is no limit for this storage, and if the remote is
unavailable (or some other error), these pending blocks may take
significant space, and this is not always desired behaviour.

Add new Distributed setting - bytes_to_throw_insert, that will set the
limit for how much pending bytes is allowed, if the limit will be
reached an exception will be throw.

By default was set to 0, to avoid surprises.
2021-03-03 23:30:00 +03:00
Azat Khuzhin
ce09b7ff89 Distributed: Implement totalBytes() (system.tables.total_bytes) 2021-03-03 23:29:11 +03:00
Azat Khuzhin
456cbaf747 Distributed: Hide private part of the interface 2021-03-03 23:29:11 +03:00
Azat Khuzhin
8531431bbc getClusterName: Use std::string over String (since it includes only <string>) 2021-03-03 23:29:11 +03:00
Alexey Milovidov
ed0099a113 Maybe unused condition 2021-03-03 23:24:56 +03:00