mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 14:42:02 +00:00
fix
This commit is contained in:
parent
c5f9022510
commit
50fd740ec3
@ -772,7 +772,7 @@ void FileCache::removeIfReleasable(bool remove_persistent_files)
|
||||
{
|
||||
std::lock_guard segment_lock(file_segment->mutex);
|
||||
file_segment->detach(cache_lock, segment_lock);
|
||||
remove(file_segment->key(), file_segment->offset(), cache_lock, segment_lock);
|
||||
to_remove.emplace_back(file_segment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,9 @@
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <Core/Types.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <Common/IFileCache.h>
|
||||
#include <Core/Types.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
@ -28,7 +28,7 @@ public:
|
||||
String toString() const;
|
||||
|
||||
Key() = default;
|
||||
explicit Key(const UInt128 & key_) : key(key_) {}
|
||||
explicit Key(const UInt128 & key_) : key(key_) { }
|
||||
|
||||
bool operator==(const Key & other) const { return key == other.key; }
|
||||
};
|
||||
@ -80,7 +80,7 @@ public:
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Not support incrementSize() for IIterator.");
|
||||
}
|
||||
|
||||
virtual Key & key() const = 0;
|
||||
virtual Key key() const = 0;
|
||||
|
||||
virtual size_t offset() const = 0;
|
||||
|
||||
|
@ -19,9 +19,9 @@ public:
|
||||
|
||||
void next() override { queue_iter++; }
|
||||
|
||||
bool valid() const override { return queue_iter != file_cache->queue.end(); }
|
||||
bool valid() const override { return (file_cache->queue.size() && (queue_iter != file_cache->queue.end())); }
|
||||
|
||||
Key & key() const override { return queue_iter->key; }
|
||||
Key key() const override { return queue_iter->key; }
|
||||
|
||||
size_t offset() const override { return queue_iter->offset; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user