Skip to content

Commit

Permalink
Add options for enabling direct I/O mode for reads and writes
Browse files Browse the repository at this point in the history
Options added upstream in 972f96b3fbae1a4675043bdf4279c9072ad69645
  • Loading branch information
etix committed Feb 12, 2017
1 parent 17365a1 commit 400048e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,18 @@ func (opts *Options) SetAllowMmapWrites(value bool) {
C.rocksdb_options_set_allow_mmap_writes(opts.c, boolToChar(value))
}

// SetUseDirectReads enable/disable direct I/O mode (O_DIRECT) for reads
// Default: false
func (opts *Options) SetUseDirectReads(value bool) {
C.rocksdb_options_set_use_direct_reads(opts.c, boolToChar(value))
}

// SetUseDirectWrites enable/disable direct I/O mode (O_DIRECT) for writes
// Default: false
func (opts *Options) SetUseDirectWrites(value bool) {
C.rocksdb_options_set_use_direct_writes(opts.c, boolToChar(value))
}

// SetIsFdCloseOnExec enable/dsiable child process inherit open files.
// Default: true
func (opts *Options) SetIsFdCloseOnExec(value bool) {
Expand Down

0 comments on commit 400048e

Please sign in to comment.