const ( // CompactionCycle is high prime used to test hash calculation between compactions. CompactionCycle = 71 )
func CorruptBBolt(fpath string) error
func PickKey(i int64) string
func TestCompactionHash(ctx context.Context, t *testing.T, h CompactionHashTestCase, compactionBatchLimit int)
type CompactionHashTestCase interface { Put(ctx context.Context, key, value string) error Delete(ctx context.Context, key string) error HashByRev(ctx context.Context, rev int64) (KeyValueHash, error) Defrag(ctx context.Context) error Compact(ctx context.Context, rev int64) error }
type KeyValueHash struct { Hash uint32 CompactRevision int64 Revision int64 }