mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-04 15:40:49 +00:00
fix access to redis dictionary after connection was dropped once
This commit is contained in:
parent
89abf4a7b0
commit
2bdf276687
@ -139,6 +139,9 @@ namespace DB
|
||||
|
||||
BlockInputStreamPtr RedisDictionarySource::loadAll()
|
||||
{
|
||||
if (!client->isConnected())
|
||||
client->connect(host, port);
|
||||
|
||||
RedisCommand command_for_keys("KEYS");
|
||||
command_for_keys << "*";
|
||||
|
||||
@ -189,6 +192,9 @@ namespace DB
|
||||
|
||||
BlockInputStreamPtr RedisDictionarySource::loadIds(const std::vector<UInt64> & ids)
|
||||
{
|
||||
if (!client->isConnected())
|
||||
client->connect(host, port);
|
||||
|
||||
if (storage_type != RedisStorageType::SIMPLE)
|
||||
throw Exception{"Cannot use loadIds with \'simple\' storage type", ErrorCodes::UNSUPPORTED_METHOD};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user