@@ -93,13 +93,13 @@ target_file_size=2097152`
93
93
{"path=/mnt/hda1,attrs=hdd,attrs=ssd" , "attrs field was used twice in store definition" , StoreSpec {}},
94
94
95
95
// size
96
- {"path=/mnt/hda1,size=671088640" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Capacity : 671088640 }}},
97
- {"path=/mnt/hda1,size=20GB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Capacity : 20000000000 }}},
98
- {"size=20GiB,path=/mnt/hda1" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Capacity : 21474836480 }}},
99
- {"size=0.1TiB,path=/mnt/hda1" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Capacity : 109951162777 }}},
100
- {"path=/mnt/hda1,size=.1TiB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Capacity : 109951162777 }}},
101
- {"path=/mnt/hda1,size=123TB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Capacity : 123000000000000 }}},
102
- {"path=/mnt/hda1,size=123TiB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Capacity : 135239930216448 }}},
96
+ {"path=/mnt/hda1,size=671088640" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Bytes : 671088640 }}},
97
+ {"path=/mnt/hda1,size=20GB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Bytes : 20000000000 }}},
98
+ {"size=20GiB,path=/mnt/hda1" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Bytes : 21474836480 }}},
99
+ {"size=0.1TiB,path=/mnt/hda1" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Bytes : 109951162777 }}},
100
+ {"path=/mnt/hda1,size=.1TiB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Bytes : 109951162777 }}},
101
+ {"path=/mnt/hda1,size=123TB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Bytes : 123000000000000 }}},
102
+ {"path=/mnt/hda1,size=123TiB" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Bytes : 135239930216448 }}},
103
103
// %
104
104
{"path=/mnt/hda1,size=50.5%" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Percent : 50.5 }}},
105
105
{"path=/mnt/hda1,size=100%" , "" , StoreSpec {Path : "/mnt/hda1" , Size : SizeSpec {Percent : 100 }}},
@@ -124,18 +124,18 @@ target_file_size=2097152`
124
124
{"size=123TB" , "no path specified" , StoreSpec {}},
125
125
126
126
// ballast size
127
- {"path=/mnt/hda1,ballast-size=671088640" , "" , StoreSpec {Path : "/mnt/hda1" , BallastSize : & SizeSpec {Capacity : 671088640 }}},
128
- {"path=/mnt/hda1,ballast-size=20GB" , "" , StoreSpec {Path : "/mnt/hda1" , BallastSize : & SizeSpec {Capacity : 20000000000 }}},
127
+ {"path=/mnt/hda1,ballast-size=671088640" , "" , StoreSpec {Path : "/mnt/hda1" , BallastSize : & SizeSpec {Bytes : 671088640 }}},
128
+ {"path=/mnt/hda1,ballast-size=20GB" , "" , StoreSpec {Path : "/mnt/hda1" , BallastSize : & SizeSpec {Bytes : 20000000000 }}},
129
129
{"path=/mnt/hda1,ballast-size=1%" , "" , StoreSpec {Path : "/mnt/hda1" , BallastSize : & SizeSpec {Percent : 1 }}},
130
130
{"path=/mnt/hda1,ballast-size=100.000%" , "ballast size (100.000%) must be between 0.000000% and 50.000000%" , StoreSpec {}},
131
131
{"ballast-size=20GiB,path=/mnt/hda1,ballast-size=20GiB" , "ballast-size field was used twice in store definition" , StoreSpec {}},
132
132
133
133
// type
134
- {"type=mem,size=20GiB" , "" , StoreSpec {Size : SizeSpec {Capacity : 21474836480 }, InMemory : true }},
135
- {"size=20GiB,type=mem" , "" , StoreSpec {Size : SizeSpec {Capacity : 21474836480 }, InMemory : true }},
136
- {"size=20.5GiB,type=mem" , "" , StoreSpec {Size : SizeSpec {Capacity : 22011707392 }, InMemory : true }},
134
+ {"type=mem,size=20GiB" , "" , StoreSpec {Size : SizeSpec {Bytes : 21474836480 }, InMemory : true }},
135
+ {"size=20GiB,type=mem" , "" , StoreSpec {Size : SizeSpec {Bytes : 21474836480 }, InMemory : true }},
136
+ {"size=20.5GiB,type=mem" , "" , StoreSpec {Size : SizeSpec {Bytes : 22011707392 }, InMemory : true }},
137
137
{"size=20GiB,type=mem,attrs=mem" , "" , StoreSpec {
138
- Size : SizeSpec {Capacity : 21474836480 },
138
+ Size : SizeSpec {Bytes : 21474836480 },
139
139
InMemory : true ,
140
140
Attributes : roachpb.Attributes {Attrs : []string {"mem" }},
141
141
}},
@@ -162,11 +162,11 @@ target_file_size=2097152`
162
162
// all together
163
163
{"path=/mnt/hda1,attrs=hdd:ssd,size=20GiB" , "" , StoreSpec {
164
164
Path : "/mnt/hda1" ,
165
- Size : SizeSpec {Capacity : 21474836480 },
165
+ Size : SizeSpec {Bytes : 21474836480 },
166
166
Attributes : roachpb.Attributes {Attrs : []string {"hdd" , "ssd" }},
167
167
}},
168
168
{"type=mem,attrs=hdd:ssd,size=20GiB" , "" , StoreSpec {
169
- Size : SizeSpec {Capacity : 21474836480 },
169
+ Size : SizeSpec {Bytes : 21474836480 },
170
170
InMemory : true ,
171
171
Attributes : roachpb.Attributes {Attrs : []string {"hdd" , "ssd" }},
172
172
}},
@@ -219,8 +219,8 @@ target_file_size=2097152`
219
219
// StoreSpec aliases base.StoreSpec for convenience.
220
220
type StoreSpec = base.StoreSpec
221
221
222
- // SizeSpec aliases storageconfig.SizeSpec for convenience.
223
- type SizeSpec = storageconfig.SizeSpec
222
+ // Size aliases storageconfig.Size for convenience.
223
+ type SizeSpec = storageconfig.Size
224
224
225
225
func TestStoreSpecListPreventedStartupMessage (t * testing.T ) {
226
226
defer leaktest .AfterTest (t )()
0 commit comments