add compaction test

This commit is contained in:
Chris Lu
2018-06-23 16:48:19 -07:00
parent 00fbca99dc
commit 3699996985
2 changed files with 98 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ type Volume struct {
}
func NewVolume(dirname string, collection string, id VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *TTL, preallocate int64) (v *Volume, e error) {
// if replicaPlacement is nil, the superblock will be loaded from disk
v = &Volume{dir: dirname, Collection: collection, Id: id}
v.SuperBlock = SuperBlock{ReplicaPlacement: replicaPlacement, Ttl: ttl}
v.needleMapKind = needleMapKind