-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: concurrent recheckTx #52
feat: concurrent recheckTx #52
Conversation
# Conflicts: # baseapp/baseapp.go
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 approve this with only understanding. I will do a precise verification of this in the later release-review.
baseapp/accountwgs.go
Outdated
return waits, signals | ||
} | ||
|
||
func (aw *AccountWGs) Waits(waits []*sync.WaitGroup) { |
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 does not need to be modified now, but it is recorded for reference at a later release review.>
It is a little strange to use a third-person verb for a function name. WaitAll
would be better.
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 agree on your opinion. I think just Wait
is better. HDYT?
req.tx, req.err = app.preCheckTx(req.txBytes) | ||
} | ||
|
||
func (app *BaseApp) checkTxAsync(req *RequestCheckTxAsync, waits []*sync.WaitGroup, signals []*AccountWG) { |
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 does not need to be modified now, but it is recorded for reference at a later release review.>
Since this function itself does not run asynchronously, it would be better to remove async
from the function name.
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 it's proper name. It calls callback
so it's a async
function.
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.
revised at cc6f354
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
) | ||
|
||
func (app *BaseApp) startReactors() { |
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 does not need to be modified now, but it is recorded for reference at a later release review.>
Since there is only one reactor, I think startReactor
is better
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 intend to add another reactor
, deliver tx, so I named it as startReactors
first.
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
* chore: simply implement abci.`CheckTxSync()` and abci.`CheckTxAsync()` * chore: move `accountLock` from `anteTx()` to `checkTxWithLock()` * feat: impl `abci.CheckTxAsync()` with reactor # Conflicts: # baseapp/baseapp.go * feat: impl `accountwgs` * feat: impl `accountwgs_test` * chore: revise code after cherry-pick * chore: bump-up tendermint & iavl * chore: rename func from `startCheckTxAsyncReactor()` to `checkTxAsyncReactor()` * fix: imports for lint * fix: imports for lint * chore: rename `Waits()` to `Wait()` # Conflicts: # baseapp/abci.go # baseapp/accountlock.go # baseapp/accountwgs_test.go # baseapp/baseapp.go # baseapp/baseapp_test.go # go.mod # go.sum
* chore: bump up ostracon * feat: concurrent recheckTx (#52) * chore: simply implement abci.`CheckTxSync()` and abci.`CheckTxAsync()` * chore: move `accountLock` from `anteTx()` to `checkTxWithLock()` * feat: impl `abci.CheckTxAsync()` with reactor # Conflicts: # baseapp/baseapp.go * feat: impl `accountwgs` * feat: impl `accountwgs_test` * chore: revise code after cherry-pick * chore: bump-up tendermint & iavl * chore: rename func from `startCheckTxAsyncReactor()` to `checkTxAsyncReactor()` * fix: imports for lint * fix: imports for lint * chore: rename `Waits()` to `Wait()` # Conflicts: # baseapp/abci.go # baseapp/accountlock.go # baseapp/accountwgs_test.go # baseapp/baseapp.go # baseapp/baseapp_test.go # go.mod # go.sum * fix: add a tag, `goleveldb`, to `test_cover.sh`
Related with: https://github.com/line/link/issues/1152, Finschia/ostracon#163, Finschia/ostracon#168, Finschia/ostracon#169
Description
To optimize performance, we need to increase concurrency. After implementing concurrent checkTx(#49), I'd like to implement concurrent recheckTx.
Motivation and context
How has this been tested?
Checklist: