Review fixes

This commit is contained in:
kssenii 2023-09-02 13:52:15 +02:00
parent 9eb1dfcd12
commit 82948ac843
4 changed files with 6 additions and 5 deletions

View File

@ -451,8 +451,8 @@ The server successfully detected this situation and will download merged part fr
M(ThreadPoolReaderPageCacheMissBytes, "Number of bytes read inside ThreadPoolReader when read was not done from page cache and was hand off to thread pool.") \
M(ThreadPoolReaderPageCacheMissElapsedMicroseconds, "Time spent reading data inside the asynchronous job in ThreadPoolReader - when read was not done from page cache.") \
\
M(AsynchronousReadWaitMicroseconds, "Time spent in waiting for asynchronous reads.") \
M(SynchronousReadWaitMicroseconds, "Time spent in waiting for synchronous reads.") \
M(AsynchronousReadWaitMicroseconds, "Time spent in waiting for asynchronous reads in asynchronous local read.") \
M(SynchronousReadWaitMicroseconds, "Time spent in waiting for synchronous reads in asynchronous local read.") \
M(AsynchronousRemoteReadWaitMicroseconds, "Time spent in waiting for asynchronous remote reads.") \
M(SynchronousRemoteReadWaitMicroseconds, "Time spent in waiting for synchronous remote reads.") \
\

View File

@ -200,11 +200,12 @@ bool AsynchronousBoundedReadBuffer::nextImpl()
prefetch_future = {};
prefetch_buffer.swap(memory);
last_prefetch_info = {};
if (read_settings.enable_filesystem_read_prefetches_log)
appendToPrefetchLog(FilesystemPrefetchState::USED, result.size, result.execution_watch);
last_prefetch_info = {};
ProfileEvents::increment(ProfileEvents::RemoteFSPrefetchedReads);
ProfileEvents::increment(ProfileEvents::RemoteFSPrefetchedBytes, result.size);
}

View File

@ -86,8 +86,7 @@ IAsynchronousReader::Result ThreadPoolRemoteFSReader::execute(Request request)
auto watch = std::make_unique<Stopwatch>(CLOCK_REALTIME);
reader.set(request.buf, request.size);
if (request.offset)
reader.seek(request.offset, SEEK_SET);
reader.seek(request.offset, SEEK_SET);
if (request.ignore)
reader.ignore(request.ignore);

View File

@ -38,6 +38,7 @@ public:
std::shared_ptr<AsyncReadCounters> getReadCounters() const { return async_read_counters; }
private:
/// Reader is used for reading only by RemoteFSFileDescriptor.
SeekableReadBuffer & reader;
std::shared_ptr<AsyncReadCounters> async_read_counters;
};