Skip to content

Commit

Permalink
Merge pull request #16940 from petermattis/pmattis/detritus
Browse files Browse the repository at this point in the history
storage,storage/engine: remove some detritus
  • Loading branch information
petermattis authored Jul 8, 2017
2 parents fc86d86 + edc0ad0 commit 6ba72ad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion pkg/storage/engine/db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,6 @@ rocksdb::Options DBMakeOptions(DBOptions db_opts) {
// Enable subcompactions which will use multiple threads to speed up
// a single compaction. The value of num_cpu/2 has not been tuned.
options.max_subcompactions = std::max(db_opts.num_cpu / 2, 1);
options.use_direct_io_for_flush_and_compaction = db_opts.use_direct_writes;
options.WAL_ttl_seconds = db_opts.wal_ttl_seconds;
options.comparator = &kComparator;
options.create_if_missing = true;
Expand Down
1 change: 0 additions & 1 deletion pkg/storage/engine/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ typedef struct {
DBCache *cache;
uint64_t block_size;
uint64_t wal_ttl_seconds;
bool use_direct_writes;
bool logging_enabled;
int num_cpu;
int max_open_files;
Expand Down
15 changes: 6 additions & 9 deletions pkg/storage/engine/rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ const (
MinimumMaxOpenFiles = 1700
)

var useDirectWrites = envutil.EnvOrDefaultBool("COCKROACH_USE_DIRECT_WRITES", false)

// SSTableInfo contains metadata about a single RocksDB sstable. This mirrors
// the C.DBSSTable struct contents.
type SSTableInfo struct {
Expand Down Expand Up @@ -399,13 +397,12 @@ func (r *RocksDB) open() error {

status := C.DBOpen(&r.rdb, goToCSlice([]byte(r.dir)),
C.DBOptions{
cache: r.cache.cache,
block_size: C.uint64_t(blockSize),
wal_ttl_seconds: C.uint64_t(walTTL),
use_direct_writes: C.bool(useDirectWrites),
logging_enabled: C.bool(log.V(3)),
num_cpu: C.int(runtime.NumCPU()),
max_open_files: C.int(r.maxOpenFiles),
cache: r.cache.cache,
block_size: C.uint64_t(blockSize),
wal_ttl_seconds: C.uint64_t(walTTL),
logging_enabled: C.bool(log.V(3)),
num_cpu: C.int(runtime.NumCPU()),
max_open_files: C.int(r.maxOpenFiles),
})
if err := statusToError(status); err != nil {
return errors.Errorf("could not open rocksdb instance: %s", err)
Expand Down
2 changes: 0 additions & 2 deletions pkg/storage/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ var txnAutoGC = true

var tickQuiesced = envutil.EnvOrDefaultBool("COCKROACH_TICK_QUIESCED", true)

// TODO(peter): Off by default until we can figure out the performance
// degradation see on test clusters.
var syncRaftLog = settings.RegisterBoolSetting(
"kv.raft_log.synchronize",
"set to true to synchronize on Raft log writes to persistent storage",
Expand Down

0 comments on commit 6ba72ad

Please sign in to comment.