Skip to content

Commit

Permalink
Merge 4928491 into 07ec793
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovic committed Jul 22, 2022
2 parents 07ec793 + 4928491 commit 03e51b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions stores/filestore.go
Expand Up @@ -433,6 +433,9 @@ func AllOptions(opts *FileStoreOptions) FileStoreOption {
if err := AutoSync(opts.AutoSync)(o); err != nil {
return err
}
if err := RecordSizeLimit(opts.RecordSizeLimit)(o); err != nil {
return err
}
o.CompactEnabled = opts.CompactEnabled
o.DoCRC = opts.DoCRC
o.DoSync = opts.DoSync
Expand Down
5 changes: 4 additions & 1 deletion stores/filestore_test.go
Expand Up @@ -578,6 +578,7 @@ func TestFSOptions(t *testing.T) {
ParallelRecovery: 5,
ReadBufferSize: 5 * 1024,
AutoSync: 2 * time.Minute,
RecordSizeLimit: 1024 * 1024,
}
// Create the file with custom options
fs, err := NewFileStore(testLogger, testFSDefaultDatastore, &testDefaultStoreLimits,
Expand All @@ -593,7 +594,9 @@ func TestFSOptions(t *testing.T) {
FileDescriptorsLimit(20),
ParallelRecovery(5),
ReadBufferSize(5*1024),
AutoSync(2*time.Minute))
AutoSync(2*time.Minute),
RecordSizeLimit(1024*1024),
)
if err != nil {
t.Fatalf("Unexpected error on file store create: %v", err)
}
Expand Down

0 comments on commit 03e51b3

Please sign in to comment.