This PR rearranges internal data access around a standard reader/writer. This way external IO logic can be embedded through the new interface FileSystem, which allows for building wrapper around said reader/writer.
This interface is not ideal as it doesn't ensure implementation to actually leverage the raw IO object. More work needs to be done to factor out code dependence on LogFd and sever FileSystem as a standalone abstraction.
This PR also implements streaming encoding. LogBatch now encodes user data immediately instead of keeping a copy and encode before actual writing.
Signed-off-by: tabokie xy.tao@outlook.com
This PR rearranges internal data access around a standard reader/writer. This way external IO logic can be embedded through the new interface
FileSystem
, which allows for building wrapper around said reader/writer. This interface is not ideal as it doesn't ensure implementation to actually leverage the raw IO object. More work needs to be done to factor out code dependence onLogFd
and severFileSystem
as a standalone abstraction.This PR also implements streaming encoding.
LogBatch
now encodes user data immediately instead of keeping a copy and encode before actual writing.Stress results: