Skip to content

Conversation

@FrankSzendzielarz
Copy link
Member

Fixes freezer on Windows.

Summary:
The O_APPEND flag in the Go implementation for windows removes the rights to truncate a file.
A workaround was implemented where O_APPEND was avoided, but writes force a Seek to end of file.

@fjl fjl changed the title Fix file system access for Windows core/rawdb: avoid O_APPEND Jun 6, 2019
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@karalabe karalabe added this to the 1.9.0 milestone Jun 7, 2019
}

// openFreezerFile opens a freezer table file and seeks to the end
func openFreezerFileForAppend(filename string) (*os.File, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick, please fix the comments so they reference the correct method (on this and the 2 methods below).

Copy link
Member

Choose a reason for hiding this comment

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

And in general, please leave an empty space after the // characters within the method comments.

Copy link
Member

Choose a reason for hiding this comment

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

And please capitalize min-method comments :)

Copy link
Member Author

Choose a reason for hiding this comment

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

lol, well spotted. thanks, and done :-)

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

SGTM

@karalabe karalabe merged commit f9c0e09 into ethereum:master Jun 10, 2019
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.

4 participants