cockroachdb / pebble

RocksDB/LevelDB inspired key-value database in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meta: add metamorphic CPU work granter

RaduBerinde opened this issue · comments

The default CPU work granter never permits extra work, leaving the relevant code paths untested. The metamorphic test should add its own implementation, and have an associated test config option (e.g. probability that it permits extra work).

Ah, I see this is only used when writing tables during compaction, and we have a separate ForceWriterParallelism option to bypass it. So we are testing both paths. Still, it would be cleaner and more powerful to use an implementation instead of an extra flag.