4 Commits

Author SHA1 Message Date
Wei Fu
939a440d6b pkg/ioutil: deflake TestPageWriterRandom
The PageWriter has cache buffer so that it doesn't call the Writer until
the cache is almost full. Since the data's length is random, the pending
bytes should be always less than cache buffer size, instead of page
size.

Fix: #16255

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit fddd1add52b33649a99d7f756404924138344a10)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-08 23:56:13 +08:00
ping40
5a94f97a4f pkg/ioutil: n is equal or greater than cw.writeBytes 2018-10-27 16:13:33 +08:00
Gyu-Ho Lee
d0c29cc610 pkg/ioutil: configure pageOffset in NewPageWriter 2016-09-28 09:45:54 -07:00
Anthony Romano
2943bf9086 ioutil: add page buffered writer
A buffered writer that only writes full pages or when explicitly flushed.
2016-08-30 15:49:07 -07:00