mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
Fix tests
This commit is contained in:
parent
170426c0a9
commit
545d3c276c
@ -123,7 +123,7 @@ bool FileCache::readThrowCacheAllowed()
|
|||||||
}
|
}
|
||||||
|
|
||||||
FileSegments FileCache::getImpl(
|
FileSegments FileCache::getImpl(
|
||||||
const Key & key, const FileSegment::Range & range, const KeyTransaction & key_transaction) const
|
const Key & key, const FileSegment::Range & range, const KeyTransaction & key_transaction)
|
||||||
{
|
{
|
||||||
/// Given range = [left, right] and non-overlapping ordered set of file segments,
|
/// Given range = [left, right] and non-overlapping ordered set of file segments,
|
||||||
/// find list [segment1, ..., segmentN] of segments which intersect with given range.
|
/// find list [segment1, ..., segmentN] of segments which intersect with given range.
|
||||||
@ -131,7 +131,7 @@ FileSegments FileCache::getImpl(
|
|||||||
if (bypass_cache_threshold && range.size() > bypass_cache_threshold)
|
if (bypass_cache_threshold && range.size() > bypass_cache_threshold)
|
||||||
{
|
{
|
||||||
auto file_segment = std::make_shared<FileSegment>(
|
auto file_segment = std::make_shared<FileSegment>(
|
||||||
range.left, range.size(), key, nullptr, nullptr,
|
range.left, range.size(), key, nullptr, this,
|
||||||
FileSegment::State::SKIP_CACHE, CreateFileSegmentSettings{});
|
FileSegment::State::SKIP_CACHE, CreateFileSegmentSettings{});
|
||||||
return { file_segment };
|
return { file_segment };
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ private:
|
|||||||
FileSegments getImpl(
|
FileSegments getImpl(
|
||||||
const Key & key,
|
const Key & key,
|
||||||
const FileSegment::Range & range,
|
const FileSegment::Range & range,
|
||||||
const KeyTransaction & key_transaction) const;
|
const KeyTransaction & key_transaction);
|
||||||
|
|
||||||
FileSegments splitRangeIntoCells(
|
FileSegments splitRangeIntoCells(
|
||||||
const Key & key,
|
const Key & key,
|
||||||
|
@ -508,7 +508,9 @@ TEST_F(FileCacheTest, get)
|
|||||||
|
|
||||||
auto settings2 = settings;
|
auto settings2 = settings;
|
||||||
settings2.max_file_segment_size = 10;
|
settings2.max_file_segment_size = 10;
|
||||||
auto cache2 = DB::FileCache(caches_dir / "cache2", settings2);
|
std::string cache_path = caches_dir / "cache2";
|
||||||
|
fs::create_directories(cache_path);
|
||||||
|
auto cache2 = DB::FileCache(cache_path, settings2);
|
||||||
cache2.initialize();
|
cache2.initialize();
|
||||||
auto key = cache2.createKeyForPath("key1");
|
auto key = cache2.createKeyForPath("key1");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user