diff --git a/pkg/storage/engine/db.cc b/pkg/storage/engine/db.cc index c8148719e814..0206d2d1dc5c 100644 --- a/pkg/storage/engine/db.cc +++ b/pkg/storage/engine/db.cc @@ -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; diff --git a/pkg/storage/engine/db.h b/pkg/storage/engine/db.h index 43440a030327..c26b62b43d3b 100644 --- a/pkg/storage/engine/db.h +++ b/pkg/storage/engine/db.h @@ -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; diff --git a/pkg/storage/engine/rocksdb.go b/pkg/storage/engine/rocksdb.go index 5a64b10ec887..a7f410a1ada4 100644 --- a/pkg/storage/engine/rocksdb.go +++ b/pkg/storage/engine/rocksdb.go @@ -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 { @@ -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) diff --git a/pkg/storage/replica.go b/pkg/storage/replica.go index e6349f6aeb5f..0698d2f001c3 100644 --- a/pkg/storage/replica.go +++ b/pkg/storage/replica.go @@ -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",