Upgrade to v3.9.8#10
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the .github/CODEOWNERS file to consolidate repository ownership under a default set of owners and introduces a new utility function, NewEspressoTableConfig, in core/rawdb/espresso_freezer.go. Feedback for the new function suggests optimizing map initialization by pre-allocating capacity and correcting a minor Go formatting issue regarding the assignment operator.
| package rawdb | ||
|
|
||
| func NewEspressoTableConfig(tables map[string]bool) map[string]freezerTableConfig { | ||
| result:= make(map[string]freezerTableConfig) |
There was a problem hiding this comment.
The map result is initialized without a specified capacity. Since the number of elements is known from the tables input, it is more efficient to pre-allocate the map capacity using len(tables) to avoid multiple re-allocations during the loop. Additionally, there is a minor style issue: there should be a space before the := operator to adhere to standard Go formatting (gofmt).
| result:= make(map[string]freezerTableConfig) | |
| result := make(map[string]freezerTableConfig, len(tables)) |
References
- Standard Go formatting (gofmt) requires a space before the
:=operator for readability. (link)
zacshowa
left a comment
There was a problem hiding this comment.
Just a question, otherwise looks good to me.
| @@ -0,0 +1,9 @@ | |||
| package rawdb | |||
|
|
|||
| func NewEspressoTableConfig(tables map[string]bool) map[string]freezerTableConfig { | |||
There was a problem hiding this comment.
Just because I lack context; whats up with this?
I only ask because we encountered some weird error related to parsing some freezer table type on startup while deploying NodeOps yesterday.
Adds 2 files on top of upstream commit of
v3.9.8