When running a benchmark without the use_existing_db flag, the db is first destroyed with the default options without considering the flags supplied. here:
if (!FLAGS_use_existing_db) {
Options options;
options.env = FLAGS_env;
if (!FLAGS_wal_dir.empty()) {
options.wal_dir = FLAGS_wal_dir;
}
if (use_blob_db_) {
// Stacked BlobDB
blob_db::DestroyBlobDB(FLAGS_db, options, blob_db::BlobDBOptions());
}
DestroyDB(FLAGS_db, options);
this might cause SanitizeOptions to call
result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_compactions, Env::Priority::LOW);result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_flushes, Env::Priority::HIGH);
with the default options for these flags and not the ones supplied in db bench.
the test then doesnt shrink back these thread pools.
When running a benchmark without the use_existing_db flag, the db is first destroyed with the default options without considering the flags supplied. here:
this might cause SanitizeOptions to call
result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_compactions, Env::Priority::LOW);
result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_flushes, Env::Priority::HIGH);
with the default options for these flags and not the ones supplied in db bench. the test then doesnt shrink back these thread pools.