Commit 4066cfb
getAttributesFromFilesV2: support requesting blake3 for trees
Summary:
# Context
The new AugmentedManifest format used by Sapling and Mononoke will support looking up Trees/Blobs from CAS via (Blake3,size) pairs. We already provide a way for users to get (Blake3,size) pairs for blobs, but there is currently no easy way to get this information for trees.
We want to add support to getAttributesFromFilesV2 for looking up the (Blake3,size) pairs for trees as well. To do this, we'll need to add a method for querying TreeMetadata (including size and Blake3 hashes) via the SaplingBackingStore.
This initial implementation of TreeMetadata will only include the following features:
1) Ability to query TreeMetadata from the SaplingBackingStore via a getTreeMetadata endpoint
2) The ability to request TreeMetadata from the getAttributesFromFilesV2 thrift endpoint
In the future, we will extend the implementation to support:
1) Automatically fetching TreeMetadata during BackingStore::getTree requests
2) Caching TreeMetadata in Eden's in-memory caches
# This diff
This diff finally implements the logic for requesting blake3 hashes from getAttributesFromFilesV2.
Reviewed By: kmancini
Differential Revision: D58594553
fbshipit-source-id: 054a39f13d606a81db915b4d616a2f4d19d347601 parent 41e6f47 commit 4066cfb
4 files changed
Lines changed: 214 additions & 61 deletions
File tree
- eden
- fs/inodes
- test
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | | - | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
| 222 | + | |
| 223 | + | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| |||
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | 233 | | |
243 | 234 | | |
244 | 235 | | |
245 | 236 | | |
246 | 237 | | |
247 | 238 | | |
| 239 | + | |
248 | 240 | | |
249 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
250 | 318 | | |
251 | 319 | | |
252 | 320 | | |
| |||
271 | 339 | | |
272 | 340 | | |
273 | 341 | | |
274 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
275 | 348 | | |
276 | 349 | | |
277 | 350 | | |
278 | 351 | | |
| 352 | + | |
| 353 | + | |
279 | 354 | | |
280 | 355 | | |
281 | 356 | | |
282 | 357 | | |
283 | 358 | | |
284 | 359 | | |
285 | 360 | | |
| 361 | + | |
| 362 | + | |
286 | 363 | | |
287 | 364 | | |
288 | 365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
849 | | - | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
850 | 856 | | |
851 | 857 | | |
852 | 858 | | |
| |||
878 | 884 | | |
879 | 885 | | |
880 | 886 | | |
881 | | - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
882 | 894 | | |
883 | 895 | | |
884 | 896 | | |
| |||
0 commit comments