Drop support for v0 and v1 blocks#919
Conversation
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
|
This is ready to go, but leaving draft status up b/c I want to merge #806 first. There will be some small conflicts. |
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
annanay25
left a comment
There was a problem hiding this comment.
LGTM, just a minor non-blocking nit
| if cap(pagesBuffer) < len(compressedPages) { | ||
| // extend pagesBuffer | ||
| diff := len(compressedPages) - cap(pagesBuffer) | ||
| pagesBuffer = append(pagesBuffer[:cap(pagesBuffer)], make([][]byte, diff)...) |
There was a problem hiding this comment.
append() will copy over all the items from old to new array right? and the resultant pagesBuffer array might have a cap larger than len(compressedPages), worth just creating a new array with cap(pagesBuffer) = len(compressedPages) ? The reuse is primarily useful when cap(pagesBuffer) > len(compressedPages) I guess
There was a problem hiding this comment.
and the resultant pagesBuffer array might have a cap larger than len(compressedPages)
I believe after this line len(pagesBuffer) = cap(pagesBuffer) = len(compressedPages)
worth just creating a new array with cap(pagesBuffer) = len(compressedPages)
by using whatever currently exists in pagesBuffer we reduce byte slice allocations. after this line the first N entries in pagesBuffer already have allocated byte slices that can be reused in ReadAllWIthBuffer. if we recreated the slice we would lose that.
What this PR does:
Drops support for v0 and v1 blocks and consolidates all code into v2.
TODO
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]