-
Notifications
You must be signed in to change notification settings - Fork 269
Vanja/feat/836 ingest without index and journal #1390
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
Vanja/feat/836 ingest without index and journal #1390
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
paologalligit
left a comment
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.
Looks good, left just a couple of minor comments. Also, if you have the manual test results on how the db time and space is impacted, would you mind attaching those in the pr? It could be useful in the future if this bit will come up again.
cmd/thor/node/packer_loop.go
Outdated
| logger.Error("Error while creating indexes", "err", err) | ||
| return err | ||
| } | ||
| if err != nil { |
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.
I think this is a duplicate from above
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.
Yes, fixed now
cmd/thor/node/node.go
Outdated
| conflicts []thor.Bytes32 | ||
| ) | ||
|
|
||
| if n.completingSync { |
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.
small thing: what if we had something like
func (n *Node) guardBlockProcessing(blockNum uint32, process func(conflicts uint32) (thor.Bytes32, error)) error {
if n.completingSync {
<-n.syncCompleteCh
}
n.processLock.Lock()
defer n.processLock.Unlock()
var (
err error
blockID thor.Bytes32
conflicts []thor.Bytes32
)
so that we don't lock - unlock - and relock?
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.
Makes sense, applied
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.
LGTM, left some comments
|
@vanja-vechain Please also consider take this into account https://github.com/vechain/thor/blob/release/v2.4.1/cmd/thor/node/block_exec.go#L285-L292 |
…836-Ingest-without-index-and-journal # Conflicts: # cmd/thor/node/node.go
Yes, this is taken into account, without wal is actually executing for w = n.logDB.NewWriterSyncOff() |
The base branch was changed.
|
Replace with #1478 |
Description
Sync without indexes and with journal off
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration
Test Configuration:
Checklist: