Fixed tests

This commit is contained in:
Maksim Kita 2021-03-28 22:42:34 +03:00
parent 608d37deed
commit 459d00f999
2 changed files with 5 additions and 4 deletions

View File

@ -47,9 +47,9 @@ bool CachedCompressedReadBuffer::nextImpl()
if (cell->compressed_size)
{
owned_cell->additional_bytes = codec->getAdditionalSizeAtTheEndOfBuffer();
owned_cell->data.resize(size_decompressed + owned_cell->additional_bytes);
decompressTo(owned_cell->data.data(), size_decompressed, size_compressed_without_checksum);
cell->additional_bytes = codec->getAdditionalSizeAtTheEndOfBuffer();
cell->data.resize(size_decompressed + cell->additional_bytes);
decompressTo(cell->data.data(), size_decompressed, size_compressed_without_checksum);
}
return cell;

View File

@ -61,7 +61,8 @@ public:
template <typename LoadFunc>
MappedPtr getOrSet(const Key & key, LoadFunc && load)
{
auto result = Base::getOrSet(key, load);
auto result = Base::getOrSet(key, std::forward<LoadFunc>(load));
if (result.second)
ProfileEvents::increment(ProfileEvents::UncompressedCacheMisses);
else