Commit 3920a9b
[9.1.0] Reduce Merkle tree footprint by referencing
…s://github.com/bazelbuild/pull/28739)
For regular files, use `FileArtifactValue`s instead of `Digest`s as the
keys in the Merkle tree's blob map. The former are retained anyway, the
latter are unique per tree.
Also describe the remaining footprint of `MerkleTree` and ideas for
future improvements.
Work towards bazelbuild#20478
Work towards bazelbuild#28734
No
- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).
RELNOTES: None
Closes bazelbuild#28739.
PiperOrigin-RevId: 879654674
Change-Id: I87fc74392481a7409f3775c27d90eab8b5eb1b4b
<!--
Thank you for contributing to Bazel!
Please read the contribution guidelines:
https://bazel.build/contribute.html
-->
### Description
<!--
Please provide a brief summary of the changes in this PR.
-->
### Motivation
<!--
Why is this change important? Does it fix a specific bug or add a new
feature?
If this PR fixes an existing issue, please link it here (e.g. "Fixes
bazelbuild#1234").
-->
### Build API Changes
<!--
Does this PR affect the Build API? (e.g. Starlark API, providers,
command-line flags, native rules)
If yes, please answer the following:
1. Has this been discussed in a design doc or issue? (Please link it)
2. Is the change backward compatible?
3. If it's a breaking change, what is the migration plan?
-->
No
### Checklist
- [ ] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).
### Release Notes
<!--
If this is a new feature, please add 'RELNOTES[NEW]: <description>'
here.
If this is a breaking change, please add 'RELNOTES[INC]: <reason>' here.
If this change should be mentioned in release notes, please add
'RELNOTES: <reason>' here.
-->
RELNOTES: None
Commit
bazelbuild@bbdc0c3
Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>FileArtifactValue (http… (bazelbuild#28918)1 parent adec20c commit 3920a9b
File tree
3 files changed
+99
-12
lines changed- src
- main/java/com/google/devtools/build/lib/remote/merkletree
- test/java/com/google/devtools/build/lib/remote
3 files changed
+99
-12
lines changedLines changed: 59 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
| 22 | + | |
18 | 23 | | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
| 31 | + | |
24 | 32 | | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| |||
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
80 | 95 | | |
81 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
82 | 121 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
86 | 130 | | |
87 | 131 | | |
88 | 132 | | |
| |||
106 | 150 | | |
107 | 151 | | |
108 | 152 | | |
109 | | - | |
| 153 | + | |
110 | 154 | | |
111 | 155 | | |
112 | 156 | | |
113 | 157 | | |
114 | | - | |
| 158 | + | |
| 159 | + | |
115 | 160 | | |
116 | 161 | | |
117 | 162 | | |
| |||
150 | 195 | | |
151 | 196 | | |
152 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
153 | 207 | | |
154 | 208 | | |
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
508 | 507 | | |
509 | 508 | | |
510 | 509 | | |
511 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
512 | 514 | | |
513 | 515 | | |
514 | 516 | | |
| |||
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
569 | | - | |
| 571 | + | |
570 | 572 | | |
571 | 573 | | |
572 | 574 | | |
| |||
659 | 661 | | |
660 | 662 | | |
661 | 663 | | |
662 | | - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
663 | 667 | | |
664 | 668 | | |
665 | 669 | | |
| |||
669 | 673 | | |
670 | 674 | | |
671 | 675 | | |
672 | | - | |
| 676 | + | |
673 | 677 | | |
674 | 678 | | |
675 | 679 | | |
| |||
688 | 692 | | |
689 | 693 | | |
690 | 694 | | |
691 | | - | |
| 695 | + | |
692 | 696 | | |
693 | 697 | | |
694 | 698 | | |
| |||
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
842 | 871 | | |
843 | | - | |
| 872 | + | |
844 | 873 | | |
845 | 874 | | |
846 | 875 | | |
| |||
0 commit comments