cshannon opened a new pull request, #3502: URL: https://github.com/apache/accumulo/pull/3502
This improves performance because creating a `ReferencedTabletFile` does a lot of validation which can be slow due to the calls to Path.getParent() if there are several files created. Filename validation was also removed from the constructor as well to further improve performance. Removing/delaying the validation checks should be safe because a `StoredTabletFile` references an existing Tablet file that was already stored in Metadata so the Path has already been validated before. Also, the `ReferencedTabletFile` is not needed often so it makes sense to delay the creation/validation until it's actually needed. It turns out that the refactoring I just did in #3417 made this super easy because the bottleneck is primarily the validation and calling Path.getParent() (not the actual creation of the Path object) which is now only done when accessing a ReferencedTabletFile. This would be harder to fix in 2.1.x due to the inheritance. #### Benchmark _before_ this change running against main: ``` Warmup Iteration 1: 0.017 ms/op Iteration 1: 0.012 ms/op Iteration 2: 0.012 ms/op Iteration 3: 0.011 ms/op 0.012 ±(99.9%) 0.008 ms/op [Average] (min, avg, max) = (0.011, 0.012, 0.012), stdev = 0.001 CI (99.9%): [0.003, 0.020] (assumes normal distribution) ``` #### Benchmark _after_ this change running against main: ``` Warmup Iteration 1: 0.007 ms/op Iteration 1: 0.004 ms/op Iteration 2: 0.004 ms/op Iteration 3: 0.004 ms/op 0.004 ±(99.9%) 0.002 ms/op [Average] (min, avg, max) = (0.004, 0.004, 0.004), stdev = 0.001 CI (99.9%): [0.002, 0.007] (assumes normal distribution) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
