aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/file.cpp
diff options
context:
space:
mode:
authorAlexander Fokin <apfokin@gmail.com>2022-02-10 16:45:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:38 +0300
commit863a59a65247c24db7cb06789bc5cf79d04da32f (patch)
tree139dc000c8cd4a40f5659e421b7c75135d080307 /util/stream/file.cpp
parentf64e95a9eb9ab03240599eb9581c5a9102426a96 (diff)
downloadydb-863a59a65247c24db7cb06789bc5cf79d04da32f.tar.gz
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/stream/file.cpp')
-rw-r--r--util/stream/file.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/stream/file.cpp b/util/stream/file.cpp
index dc5d2f6311..3e8b881a8b 100644
--- a/util/stream/file.cpp
+++ b/util/stream/file.cpp
@@ -25,13 +25,13 @@ size_t TUnbufferedFileInput::DoRead(void* buf, size_t len) {
size_t TUnbufferedFileInput::DoSkip(size_t len) {
if (len < 384) {
- /* Base implementation calls DoRead, which results in one system call
- * instead of three as in fair skip implementation. For small sizes
- * actually doing one read is cheaper. Experiments show that the
- * border that separates two implementations performance-wise lies
- * in the range of 384-512 bytes (assuming that the file is in OS cache). */
+ /* Base implementation calls DoRead, which results in one system call
+ * instead of three as in fair skip implementation. For small sizes
+ * actually doing one read is cheaper. Experiments show that the
+ * border that separates two implementations performance-wise lies
+ * in the range of 384-512 bytes (assuming that the file is in OS cache). */
return IInputStream::DoSkip(len);
- }
+ }
/* TFile::Seek can seek beyond the end of file, so we need to do
* size check here. */
@@ -40,8 +40,8 @@ size_t TUnbufferedFileInput::DoSkip(size_t len) {
i64 newPos = File_.Seek(Min<i64>(size, oldPos + len), sSet);
return newPos - oldPos;
-}
-
+}
+
TUnbufferedFileOutput::TUnbufferedFileOutput(const TString& path)
: File_(path, CreateAlways | WrOnly | Seq)
{