Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WriteALogPackage] flush before call return readers, binary search #27

Open
hhow09 opened this issue Mar 10, 2023 · 0 comments
Open

[WriteALogPackage] flush before call return readers, binary search #27

hhow09 opened this issue Mar 10, 2023 · 0 comments

Comments

@hhow09
Copy link

hhow09 commented Mar 10, 2023

  1. func (l *Log) Reader() io.Reader {

should we flush the store before return reader just like what Read() did ? Otherwise records might still in buffer.

  1. func (l *Log) Read(off uint64) (*api.Record, error) {

can use binary search to search offset since segments are sorted.

@hhow09 hhow09 changed the title flush before call return readers, binary search [WriteALogPackage] flush before call return readers, binary search Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant