Skip to content

maxBytesPerFile read check off-by-one #14

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

Closed
xkeyideal opened this issue Apr 1, 2020 · 3 comments
Closed

maxBytesPerFile read check off-by-one #14

xkeyideal opened this issue Apr 1, 2020 · 3 comments

Comments

@xkeyideal
Copy link

https://github.com/nsqio/go-diskqueue/blob/master/diskqueue.go#L332

should change it if d.nextReadPos >= d.maxBytesPerFile {

@ploxiln ploxiln changed the title maybe the code has some problem maxBytesPerFile read check off-by-one Apr 1, 2020
@ploxiln
Copy link
Member

ploxiln commented Apr 1, 2020

This looks like a very similar situation to what #8 fixed. Would you like to open a pull request?

@ploxiln
Copy link
Member

ploxiln commented Apr 1, 2020

(I think this particular check is not as important, because the end-of-file is handled elsewhere.)

@ploxiln
Copy link
Member

ploxiln commented Apr 3, 2020

closing in favor of #15

@ploxiln ploxiln closed this as completed Apr 3, 2020
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

2 participants