-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dictionaries didn't updated in v.18.14.18 #3829
Comments
+1
An attempt to restart dictionary from the console hangs as unkillable query. |
+1 |
@angeldestroyer In startup process clickhouse updates dictionaries for the first time. If I understood correctly clickhouse can start with that configuration, but cannot update dictionaries? Can you set your log-level to trace? Also, can you provide information about your OS? Maybe you use clickhouse in docker? Also I'd like to see output of |
OS: ubuntu 16.04.5 LTS (not docker)
long wait ... log:
What can be filtered in the log, since there is a lot of data not associated with the dictionary? |
Process |
No, this process should stay alive with clickhouse server. |
@alesapin, yes, at start all looks fine. But when the update should be performed - timeout occurs and nothing happens. Not docker, not vm. Package installed from the official repository. In the logs only that indicated when opening issue, without additional information. 76116 ? Ssl 686:10 /usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml
76162 ? Sl 5:36 /usr/bin/clickhouse odbc-bridge --http-port 9018 --listen-host localhost --http-timeout 1800000000 |
18.16.0 also has problems. |
I have tried to reproduce the issue, but everything seems to work fine for me(.
configs:
odbc.ini
Example usage:
Can you provide similar information about your setup or minimal example to reproduce the issue? P.S. Also we have integration tests in docker which interact via odbc with different databases -- sqlite, postgres and mysql. These tests are also in green state. |
Sorry, did not notice, that you use
Queries:
|
Error appears when updating one of the dictionaries failed:
After this the dictionaries are not updated. If kill the |
@k0st1an I.e. single update performed after odbc-bridge restart, but all consecutive updates hang?
Try to |
Not works if |
Was Anyway, need logs of |
When execute
|
|
Sorry, this diagnosis is not enought. |
The problem is not reproduced on a small number of dictionaries (or allocated_memory). "Disabled" all dictionaries and restarted CH (I have 12 Hashed/ComplexKeyHashed dictionaries with size ranging from 100KB to 1,4GB). Enable two test-dictionaries.
SYSTEM RELOAD DICTIONARIES
Ok.
0 rows in set. Elapsed: 0.068 sec. I return my dictionary: SYSTEM RELOAD DICTIONARIES
Ok.
0 rows in set. Elapsed: 64.055 sec.
## Get info
┌─name─────────────────────┬─type─────────────┬─key──────┬─element_count─┬─formatReadableSize(bytes_allocated)─┬───────creation_time─┬─last_exception─┐
│ <dict_name_1> │ Hashed │ UInt64 │ 462832 │ 742.19 MiB │ 2018-12-18 11:07:46 │ │
│ postgres_odbc_hashed │ ComplexKeyHashed │ (Int64) │ 3 │ 18.37 KiB │ 2018-12-18 11:07:46 │ │
│ postgres_odbc_hashed_str │ ComplexKeyHashed │ (String) │ 2 │ 18.37 KiB │ 2018-12-18 11:09:11 │ │
└──────────────────────────┴──────────────────┴──────────┴───────────────┴─────────────────────────────────────┴─────────────────────┴────────────────┘ Enable one more: SYSTEM RELOAD DICTIONARIES
Ok.
0 rows in set. Elapsed: 32.791 sec.
## Get info ...
┌─name─────────────────────┬─type─────────────┬─key──────┬─element_count─┬─formatReadableSize(bytes_allocated)─┬───────creation_time─┬─last_exception─┐
│ <dict_name_2> │ Hashed │ UInt64 │ 5743 │ 9.96 MiB │ 2018-12-18 11:11:26 │ │
│ <dict_name_1> │ Hashed │ UInt64 │ 462833 │ 742.19 MiB │ 2018-12-18 11:11:26 │ │
│ postgres_odbc_hashed │ ComplexKeyHashed │ (Int64) │ 3 │ 18.37 KiB │ 2018-12-18 11:11:26 │ │
│ postgres_odbc_hashed_str │ ComplexKeyHashed │ (String) │ 2 │ 18.37 KiB │ 2018-12-18 11:13:11 │ │
└──────────────────────────┴──────────────────┴──────────┴───────────────┴─────────────────────────────────────┴─────────────────────┴────────────────┘
Enable one more: SYSTEM RELOAD DICTIONARIES
...... long-long time ...... and file <dict_name_3>-preprocessed.xml is not created. Information about this dictionary from a working server: ┌─type───┬─key────┬─element_count─┬─size───────┬───────creation_time─┬─last_exception─┐
│ Hashed │ UInt64 │ 995 │ 156.35 KiB │ 2018-12-18 11:22:16 │ │
└────────┴────────┴───────────────┴────────────┴─────────────────────┴────────────────┘ Just in case $ free -hm
total used free shared buff/cache available
Memory: 19G 4,8G 1,1G 24M 13G 14G
$ ps ax | grep clickhouse
49074 ? Ssl 1:16 /usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml
49105 ? Sl 1:22 /usr/bin/clickhouse odbc-bridge --http-port 9018 --listen-host localhost --http-timeout 1800000000 If i do SYSTEM RELOAD DICTIONARIES
Ok.
0 rows in set. Elapsed: 47.224 sec.
## Get info
┌─name─────────────────────┬─type─────────────┬─key──────┬─element_count─┬─formatReadableSize(bytes_allocated)─┬───────creation_time─┬─last_exception─┐
│ <dict_name_2> │ Hashed │ UInt64 │ 5743 │ 9.96 MiB │ 2018-12-18 11:38:12 │ │
│ <dict_name_1> │ Hashed │ UInt64 │ 462856 │ 742.19 MiB │ 2018-12-18 11:38:12 │ │
│ postgres_odbc_hashed │ ComplexKeyHashed │ (Int64) │ 3 │ 18.37 KiB │ 2018-12-18 11:38:12 │ │
│ <dict_name_3> │ Hashed │ UInt64 │ 995 │ 156.35 KiB │ 2018-12-18 11:38:12 │ │
│ postgres_odbc_hashed_str │ ComplexKeyHashed │ (String) │ 2 │ 18.37 KiB │ 2018-12-18 11:39:57 │ │
└──────────────────────────┴──────────────────┴──────────┴───────────────┴─────────────────────────────────────┴─────────────────────┴────────────────┘
$ curl http://localhost:9018/ping
Ok. Reload dictionaries again: SYSTEM RELOAD DICTIONARIES
....... nothing happens ...... and now |
I tried to "enable" dictionaries from small to large.
When I tried to add a ~410MB dictionary - problem repeated ## from another CH v18.14.9
┌─type───┬─key────┬─element_count─┬─size───────┬───────creation_time─┬─last_exception─┐
│ Hashed │ UInt64 │ 462892 │ 409.22 MiB │ 2018-12-18 12:17:22 │ │
└────────┴────────┴───────────────┴────────────┴─────────────────────┴────────────────┘ |
@k0st1an @angeldestroyer as workaround specify settings for odbc-bridge logging: |
I don't know why, but after adding the specified logging settings, the error is not reproduced. Dictionaries reload in 2-3 minutes. Previously, you could wait more than 10 minutes and nothing happened or see timeout error. |
@angeldestroyer |
@angeldestroyer After the changes, everything works well. |
v18.14.19-stable released, please update and try to disable settings. This fix is almost the only in this version. |
Clickhouse version 18.14.18. I have several odbc dictionaries (mssql, postgres) with
Data in mssql/postgres updated every 5-10 minutes.
However, dictionary updates are not performed.
If i execute:
SYSTEM RELOAD DICTIONARY testdict;
return: long wait and
<Error> ExternalDictionaries: Cannot update external dictionary 'testdict', leaving old version: Poco::Exception. Code: 1000, e.code() = 11, e.displayText() = Timeout, e.what() = Timeout
in clickhouse-server.err.logIn clickhouse-server.log:
In version 18.14.9 everything works well.
The text was updated successfully, but these errors were encountered: