Commit Graph

1448 Commits

Author SHA1 Message Date
Kseniia Sumarokova
1b517105db
Merge pull request #57323 from valbok/mysql-binlog-client
MaterializedMySQL: Introduce MySQL Binlog Client
2024-01-10 09:08:13 +01:00
Alexander Tokmakov
92daa17b31
Merge pull request #57697 from ClickHouse/dependency-failure
Customizable dependency failure handling for AsyncLoader
2024-01-09 14:03:35 +01:00
Bharat Nallan Chakravarthy
d63765fb19 Merge upstream/master into ncb/support-hints-for-db-engines 2024-01-03 08:44:11 -08:00
Val Doroshchuk
5c221d123d MaterializedMySQL: Introduce MySQL Binlog Client
One binlog connection for many databases.

Suggesting to disable this feature by default for now. It should be explicitly enabled by SETTINGS use_binlog_client=1.
But if you would permanently enable it in MaterializedMySQLSettings, it should keep old behavior and all tests should pass too.

1. Introduced `IBinlog` and its impl to read the binlog events from socket - `BinlogFromSocket`, or file - `BinlogFromFile`. Based on prev impl of `EventBase` and the same old binlog parsers. It fully keeps BC with old version. Fixed `./check-mysql-binlog` to test new impl.
2. Introduced `BinlogEventsDispatcher`, it reads the event from the source `IBinlog` and sends it to currently attached `IBinlog` instances.
3. Introduced `BinlogClient`, which is used to group a list of `BinlogEventsDispatcher` by MySQL binlog connection which is defined by `user:password@host:port`. All dispatchers with the same binlog position should be merged to one.
4. Introduced `BinlogClientFactory`, which is a singleton and it is used to track all binlogs created over the instance.
5. Introduced `use_binlog_client` setting to `MaterializedMySQL`, which forces to reuse a `BinlogClient` if it already exists in `BinlogClientCatalog` or create new one. By default, it is disabled.
6. Introduced `max_bytes_in_binlog_queue` setting to define the limit of bytes in binlog's queue of events. If bytes in the queue increases this limit, `BinlogEventsDispatcher` will stop reading new events from source `IBinlog` until the space for new events will be freed.
7. Introduced `max_milliseconds_to_wait_in_binlog_queue` setting to define max ms to wait when the max bytes exceeded.
7. Introduced `max_milliseconds_to_wait_in_binlog_queue` setting to define max ms to wait when the max bytes exceeded.
8. Introduced `max_bytes_in_binlog_dispatcher_buffer` setting to define max bytes in the binlog dispatcher's buffer before it is flushed to attached binlogs.
9. Introduced `max_flush_milliseconds_in_binlog_dispatcher` setting to define max milliseconds in the binlog dispatcher's buffer to wait before it is flushed to attached binlogs.
10. Introduced `system.mysql_binlogs` system table, which shows a list of active binlogs.
11. Introduced `UnparsedRowsEvent` and `MYSQL_UNPARSED_ROWS_EVENT`, which defines that an event is not parsed and should be explicitly parsed later.
12. Fixed bug when not possible to apply DDL since syntax error or unsupported SQL.

@larspars is the author of following:
`GTIDSets::contains()`
`ReplicationHelper`
`shouldReconnectOnException()`
2024-01-03 15:26:09 +01:00
Alexey Milovidov
029b1326e0
Merge pull request #58399 from ClickHouse/minor-fixes-lambda
Fix a comment; remove unused method; stop using pointers
2024-01-02 19:21:00 +01:00
Bharat Nallan Chakravarthy
6e2c4f04aa support hints for database engine 2024-01-01 21:31:22 -08:00
Alexey Milovidov
6a4409200e DatabaseReplicated: too much success 2024-01-01 22:01:25 +01:00
Bharat Nallan Chakravarthy
de821fca8a remove leftover cruft 2023-12-31 21:31:23 -08:00
Bharat Nallan Chakravarthy
1e0ccf917c make getImpl private 2023-12-31 20:36:18 -08:00
Bharat Nallan Chakravarthy
c342688821 fail even earlier for invalid engine 2023-12-31 20:36:18 -08:00
Bharat Nallan Chakravarthy
f16ae027fc fix validation of database engines 2023-12-31 17:45:03 -08:00
Bharat Nallan Chakravarthy
00b5e28d6a Merge upstream/master into ncb/system-database-engines 2023-12-30 23:10:48 -08:00
Bharat Nallan Chakravarthy
3c4ac0ba08 add system.database_engines table 2023-12-30 20:31:25 -08:00
Alexey Milovidov
b752a1c62e
Merge pull request #58365 from bharatnc/ncb/refactor-db-factory
independent registration of database engines
2023-12-31 00:56:24 +01:00
Bharat Nallan Chakravarthy
6c4a4991e2 few more fixes 2023-12-30 09:26:53 -08:00
Bharat Nallan Chakravarthy
906745feaa validation and left over fixes 2023-12-29 20:06:07 -08:00
Bharat Nallan Chakravarthy
af534db4d9 style fixes and cleanup 2023-12-29 16:38:17 -08:00
Bharat Nallan Chakravarthy
ab28da85d3 try wire everything up 2023-12-29 16:38:17 -08:00
Bharat Nallan Chakravarthy
8e83d3604d register all remaining databases 2023-12-29 16:38:02 -08:00
Sergei Trifonov
e2b43c2cfa
Update src/Databases/DatabaseOrdinary.cpp 2023-12-29 14:29:30 +01:00
Bharat Nallan Chakravarthy
1dce048b58 initial refactor of db registration 2023-12-28 18:59:45 -08:00
Michael Kolupaev
f0417d0ec3 Things 2023-12-28 17:56:05 +00:00
Michael Kolupaev
a524e8c51e Overhaul dependencies 2023-12-28 17:56:04 +00:00
serxa
54fbb059a0 Merge branch 'master' into dependency-failure 2023-12-28 14:43:17 +00:00
Alexander Tokmakov
38fe70c68a
Revert "Refreshable materialized views (takeover)" 2023-12-28 13:12:20 +01:00
Alexey Milovidov
40a5dbdeba
Merge branch 'master' into mv 2023-12-28 03:16:27 +01:00
Michael Kolupaev
538b23d862 Things 2023-12-27 20:24:55 +00:00
Michael Kolupaev
01369a0a8a Overhaul dependencies 2023-12-27 20:24:54 +00:00
Azat Khuzhin
b9233f6d4f Move Allocator code into module part
This should reduce amount of code that should be recompiled on
Exception.h changes (and everything else that had been included there).

This will actually not help a lot, because it is also included into
PODArray.h and ThreadPool.h at least... Sigh.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-27 15:42:08 +01:00
Azat Khuzhin
3be3b0a280 Fix incorrect Exceptions
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-24 21:26:32 +01:00
serxa
2052a6aaac Merge branch 'master' into dependency-failure 2023-12-22 11:22:48 +00:00
Alexander Tokmakov
858f2be6b5
Merge pull request #57337 from ClickHouse/drop_database_replica_no_throw
Don't throw if noop when dropping database replica in batch
2023-12-20 16:48:58 +01:00
jsc0218
0a9475abc7
Merge pull request #57874 from joelynch/joelynch/host-psql
bugfix: addresses_expr ignored for psql named collections
2023-12-19 15:24:23 -05:00
Alexey Milovidov
7178bd5c88
Merge pull request #57910 from Algunenano/log_message_string
Improvements for 00002_log_and_exception_messages_formatting
2023-12-18 21:02:23 +01:00
Nikolay Degterinsky
bd17ee769e
Merge pull request #57938 from bharatnc/ncb/tablesloder-remove-cruft
remove cruft from TablesLoader
2023-12-18 14:46:36 +01:00
Raúl Marín
2639d0715f Merge remote-tracking branch 'blessed/master' into log_message_string 2023-12-18 10:40:18 +01:00
Raúl Marín
f10dae4761
Merge pull request #56917 from Algunenano/backup_1
Prepare the introduction of more keeper faults
2023-12-18 10:27:48 +01:00
Bharat Nallan Chakravarthy
0a1a66fd18 remove cruft from TablesLoader 2023-12-15 22:54:47 -08:00
Raúl Marín
b269f87f4c Better text_log with ErrnoException 2023-12-15 19:27:56 +01:00
Yarik Briukhovetskyi
325374c68b
Merge pull request #57342 from bharatnc/ncb/better-hint-if-table-doesnt-exist
provide a better hint if a table doesn't exist
2023-12-15 12:35:13 +01:00
Bharat Nallan Chakravarthy
daef2febf3 Merge with 'upstream/master' 2023-12-14 11:19:44 -08:00
joelynch
b4bef78e63
bugfix: addresses_expr ignored for psql named collections 2023-12-14 17:17:14 +01:00
Raúl Marín
efcacd3c34 Merge remote-tracking branch 'blessed/master' into backup_1 2023-12-14 11:08:50 +01:00
Azat Khuzhin
0e86e16a01
Revert "Replace --no-system-tables with loading virtual tables of system database lazily" 2023-12-14 09:07:47 +01:00
jsc0218
78773157b6
Merge pull request #57436 from ryanmjacobs/fix_issue_43186_pg_quote_array_ndims
Fix several issues regarding PostgreSQL `array_ndims` usage.
2023-12-13 13:41:43 -05:00
Raúl Marín
dd405a655e Merge remote-tracking branch 'blessed/master' into backup_1 2023-12-13 13:39:58 +01:00
Kseniia Sumarokova
b1325450e9
Merge pull request #57754 from ClickHouse/fix-loading-dependent-table-materialized-postgresql
Table engine MaterializedPostgreSQL fix dependency loading
2023-12-13 12:17:01 +01:00
Han Fei
a96593c8b1 Merge branch 'master' into feature/more_warnings 2023-12-12 15:25:01 +01:00
Ryan Jacobs
40da568ef9
Merge branch 'master' into fix_issue_43186_pg_quote_array_ndims 2023-12-11 11:17:38 -08:00
kssenii
05e56f76ed Merge remote-tracking branch 'origin/master' into fix-loading-dependent-table-materialized-postgresql 2023-12-11 20:17:26 +01:00