Fix test, disable cache for DiskCacheWrapper

This commit is contained in:
kssenii 2022-03-09 09:46:04 +01:00
parent 894161430b
commit 96789fa5ce
2 changed files with 7 additions and 5 deletions

View File

@ -144,11 +144,13 @@ DiskCacheWrapper::readFile(
}
}
auto current_read_settings = settings;
/// Do not use RemoteFSReadMethod::threadpool for index and mark files.
/// Here it does not make sense since the files are small.
/// Note: enabling `threadpool` read requires to call setReadUntilEnd().
auto current_read_settings = settings;
current_read_settings.remote_fs_method = RemoteFSReadMethod::read;
/// Disable data cache.
current_read_settings.remote_fs_enable_cache = false;
if (metadata->status == DOWNLOADING)
{

View File

@ -19,10 +19,6 @@ AND current_database = currentDatabase()
ORDER BY query_start_time DESC
LIMIT 1;
SELECT * FROM test WHERE value LIKE '%abc%' ORDER BY value LIMIT 10 FORMAT Null;
SELECT * FROM test ORDER BY value LIMIT 10 FORMAT Null;
SELECT * FROM test WHERE value LIKE '%dba%' ORDER BY value LIMIT 10 FORMAT Null;
SET remote_filesystem_read_method='read';
SELECT 2, * FROM test LIMIT 10 FORMAT Null;
@ -39,4 +35,8 @@ AND current_database = currentDatabase()
ORDER BY query_start_time DESC
LIMIT 1;
SELECT * FROM test WHERE value LIKE '%abc%' ORDER BY value LIMIT 10 FORMAT Null;
SELECT * FROM test ORDER BY value LIMIT 10 FORMAT Null;
SELECT * FROM test WHERE value LIKE '%dba%' ORDER BY value LIMIT 10 FORMAT Null;
DROP TABLE test NO DELAY;