-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: iavl live migration of orphan nodes #866
Closed
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6444ca0
make debug logs
ValarDragon d868459
Revert "make debug logs"
czarcas7ic 6aee1ef
orphan change
czarcas7ic cb9b241
Dev orphan code
ValarDragon 80584b9
tune params
ValarDragon a62ea1d
Fix stacking
ValarDragon 154ef57
Fix
ValarDragon f5cce22
Use 32Byte encoding + make legacy encoding improvements
ValarDragon c6c34dc
Speedup key formatting
ValarDragon b7ccd32
Avoid making an extra heap copy in DecodeBytes
ValarDragon 722e09d
Single side fetch for legacy
ValarDragon 6663e38
tryfix issue
ValarDragon 2628908
tryfix again
ValarDragon 49995ca
make debug logs
ValarDragon 2259995
better debug logs
ValarDragon 8edf0b7
clean up
czarcas7ic 1081deb
upgrade lint CI to use go 1.21
czarcas7ic 236067a
attempt fix linter
czarcas7ic 826e663
go 1.21
czarcas7ic 27f52b2
remove diff check
czarcas7ic 03fc7c0
add makefile cmd
czarcas7ic a03a1fd
existing lint cmd
czarcas7ic e0e723c
check out repo code
czarcas7ic 6b2cdef
lints
czarcas7ic 2c321d8
fmt
czarcas7ic 50e9df0
fmt
czarcas7ic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package keyformat | ||
|
||
import "encoding/binary" | ||
|
||
// This file builds some dedicated key formatters for what appears in benchmarks. | ||
|
||
// Prefixes a single byte before a 32 byte hash. | ||
type FastPrefixFormatter struct { | ||
prefix byte | ||
length int | ||
prefixSlice []byte | ||
} | ||
|
||
func NewFastPrefixFormatter(prefix byte, length int) *FastPrefixFormatter { | ||
return &FastPrefixFormatter{prefix: prefix, length: length, prefixSlice: []byte{prefix}} | ||
} | ||
|
||
func (f *FastPrefixFormatter) Key(bz []byte) []byte { | ||
key := make([]byte, 1+f.length) | ||
key[0] = f.prefix | ||
copy(key[1:], bz) | ||
return key | ||
} | ||
|
||
func (f *FastPrefixFormatter) Scan(key []byte, a interface{}) { | ||
scan(a, key[1:]) | ||
} | ||
|
||
func (f *FastPrefixFormatter) KeyInt64(bz int64) []byte { | ||
key := make([]byte, 1+f.length) | ||
key[0] = f.prefix | ||
binary.BigEndian.PutUint64(key[1:], uint64(bz)) | ||
return key | ||
} | ||
|
||
func (f *FastPrefixFormatter) Prefix() []byte { | ||
return f.prefixSlice | ||
} | ||
|
||
func (f *FastPrefixFormatter) Length() int { | ||
return 1 + f.length | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a drive by change, the linter was not working on any open PR