Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sumdb/tlog: make NewTiles only generate strictly necessary tiles
Currently, NewTiles returns tiles for every partial tree size from oldTreeSize to newTreeSize. However, if a log is only publishing checkpoints at oldTreeSize and newTreeSize, the trees of sizes oldTreeSize+1 to newTreeSize-1 are unverifiable, so those tiles are unnecessary. Also, NewTiles currently returns tiles that already exists as part of oldTreeSize, which are not new. This has a significant performance and cost difference when uploading tiles individually to e.g. object storage. Change-Id: I92a5d76bc54e7022991e51997e793356ab5e7d5c Reviewed-on: https://go-review.googlesource.com/c/mod/+/570295 Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
- Loading branch information