node: Break notary deposit wait after VUB #1467
No reviewers
TrueCloudLab/storage-core-developers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1467
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/deposit_vub"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There is no point in waiting for the transaction to complete after VUB.
6fced12a69
to1facf94b49
@ -192,2 +192,4 @@
return fmt.Errorf("could not wait for one block in chain: %w", err)
}
currHeight, err := c.cfgMorph.client.BlockCount()
This is tricky, because there is some time between
TxHalt()
andBlockCount()
Consider this scenario:
TxHalt()
at Height=VUB-1I think we must make yet another
TxHalt
request in casecurrHeight > vub
.Still we may switch endpoint, but this is a more rare event.
Another option would be to make
WaitTxPersist(ctx, tx)
and do everything under switch mutex.Also, can we reuse something from https://github.com/nspcc-dev/neo-go/blob/master/pkg/rpcclient/waiter/waiter.go ?
Done: make yet another
TxHalt
request in casecurrHeight > vub
Don't think we need one more dependency from neo-go.
We already depend on the module (and it is external).
And that package canonically solves exactly our problem (I have given 1 error, who knows what else can go wrong).
Then why do you ask, if in fact you insist on using it?
fixed
That seemed like an obvious choice, and I wanted to know if there was any reason not to make it.
I find yet-another-dependency (which in fact is already is in
go.mod
) argument weak.I don't see an obvious choice: to use this interface, which I didn't even know about (and not only me), I had to add a structure and two methods, and also add a dependency on a package that can be changed at any time (do you know how neo-go supports backward compatibility?)
The implementation itself also raises questions:
Execution: res.Executions[0]
const PollingBasedRetryCount = 3
is not configured1facf94b49
toce13b46281
New commits pushed, approval review dismissed automatically according to repository settings
ce13b46281
to2bcdb65378
2bcdb65378
to99240923a2
99240923a2
to1fd704a376
on a side note: systemd status will update after we have made bootstrap request, right?
yes
@ -197,0 +201,4 @@
}
return fmt.Errorf("could not wait for notary deposit persists in chain: %w", err)
}
if success := res.Execution.VMState.HasFlag(vmstate.Halt); success {
if res.Execution.VMState.HasFlag(vmstate.Halt) {
?ok, fixed
1fd704a376
to6c45a17af6