Skip to content

Read correct number of messages from end of file#7

Merged
leonzz merged 2 commits into
masterfrom
leonzz
Jul 23, 2021
Merged

Read correct number of messages from end of file#7
leonzz merged 2 commits into
masterfrom
leonzz

Conversation

@leonzz
Copy link
Copy Markdown
Collaborator

@leonzz leonzz commented Jul 16, 2021

Directly read from file instead of the bufio.Reader to prevent wrong data from buffer.

Also with some trivial improvements on checkes:

  • deleted the if expectedBytesIncrease > d.maxBytesDiskSpace check from freeDiskSpace because the same check has been done already in checkDiskSpace.
  • in constructor, ensure disk size limit is larger than a max sized file + metadata file.

@leonzz leonzz requested review from CatherineF-dev and kev1n80 July 16, 2021 18:21
Copy link
Copy Markdown
Owner

@kev1n80 kev1n80 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for implementing the solution for the negative depth error and adding improvements!

@leonzz leonzz merged commit adc5610 into master Jul 23, 2021
@leonzz leonzz deleted the leonzz branch July 23, 2021 16:28
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

Successfully merging this pull request may close these issues.

2 participants