Changed the InMemory bool to a uint32 so that it can be used to alter how much space to reserve

This commit is contained in:
Tom Maxwell
2019-09-04 15:27:14 +01:00
parent 6ee65356e3
commit 4a878c0006
20 changed files with 111 additions and 67 deletions

View File

@@ -18,12 +18,12 @@ func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid needle.Vol
return operation.WithVolumeServerClient(dn.Url(), grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
_, deleteErr := client.AllocateVolume(context.Background(), &volume_server_pb.AllocateVolumeRequest{
VolumeId: uint32(vid),
Collection: option.Collection,
Replication: option.ReplicaPlacement.String(),
Ttl: option.Ttl.String(),
Preallocate: option.Prealloacte,
InMemory: option.InMemory,
VolumeId: uint32(vid),
Collection: option.Collection,
Replication: option.ReplicaPlacement.String(),
Ttl: option.Ttl.String(),
Preallocate: option.Prealloacte,
MemoryMapMaxSizeMB: option.MemoryMapMaxSizeMB,
})
return deleteErr
})

View File

@@ -21,14 +21,14 @@ This package is created to resolve these replica placement issues:
*/
type VolumeGrowOption struct {
Collection string
ReplicaPlacement *storage.ReplicaPlacement
Ttl *needle.TTL
Prealloacte int64
DataCenter string
Rack string
DataNode string
InMemory bool
Collection string
ReplicaPlacement *storage.ReplicaPlacement
Ttl *needle.TTL
Prealloacte int64
DataCenter string
Rack string
DataNode string
MemoryMapMaxSizeMB uint32
}
type VolumeGrowth struct {