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

wal: Export SegmentSizeBytes as a variable #6139

Merged
merged 1 commit into from
Aug 10, 2016

Conversation

aaronlehmann
Copy link
Contributor

In test situations, it's useful to create smaller than usual WAL files
to test rotation and to avoid the overhead of preallocation on old-style
filesystems that don't handle it efficiently. This commit changes
segmentSizeBytes to an exported variable so that tests can override it
from an init() function.

Fixes: #6138

// warnSyncDuration is the amount of time allotted to an fsync before
// logging a warning
warnSyncDuration = time.Second
)

var (
// SegmentSizeBytes is the expected size of each wal segment file.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/expected/preallocated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this. Thanks for the quick review.

@heyitsanthony
Copy link
Contributor

lgtm after fixing minor comment nit and ci passes. Thanks!

In test situations, it's useful to create smaller than usual WAL files
to test rotation and to avoid the overhead of preallocation on old-style
filesystems that don't handle it efficiently. This commit changes
segmentSizeBytes to an exported variable so that tests can override it
from an init() function.
@xiang90 xiang90 merged commit 2d3eda4 into etcd-io:master Aug 10, 2016
@aaronlehmann aaronlehmann deleted the export-segment-size branch August 10, 2016 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants