0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 13:38:55 +02:00

ircd::db: Add circuit-breaker to disable compaction per-column in the descriptor.

This commit is contained in:
Jason Volk 2023-02-25 00:33:25 -08:00
parent ab77a32dce
commit 096a67ff8d
2 changed files with 6 additions and 1 deletions

View file

@ -139,4 +139,8 @@ struct ircd::db::descriptor
{
2
};
/// Circuit-breaker to disable automatic compaction specifically for this
/// column from this descriptor.
bool compaction {true};
};

View file

@ -1775,7 +1775,8 @@ ircd::db::database::column::column(database &d,
// Conf item can be set to disable automatic compactions. For developers
// and debugging; good for valgrind.
this->options.disable_auto_compactions = !bool(db::auto_compact);
this->options.disable_auto_compactions =
!this->descriptor->compaction || !bool(db::auto_compact);
// Set the compaction style; we don't override this in the descriptor yet.
//this->options.compaction_style = rocksdb::kCompactionStyleNone;