Skip to content
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

PLAT-671: send VDelegatedRequestFinished after retries for correct pending count #568

Merged

Conversation

aalekseev-ru
Copy link
Contributor

add send, add log in handler for empty latestState case, actualize test

@aalekseev-ru aalekseev-ru added autoupdate This branch will be automatically updated by the Bulldozer bot automerge PR is ready to be merged automatically labels Jul 22, 2020
@aalekseev-ru aalekseev-ru requested a review from a team July 22, 2020 17:42
…671_send_VDelegatedRequestFinished_after_retries
@bigbes bigbes self-assigned this Jul 22, 2020
@@ -722,6 +722,8 @@ func (s *SMExecute) stepSendOutgoing(ctx smachine.ExecutionContext) smachine.Sta
}
} else {
if s.outgoingSentCounter >= MaxOutgoingSendCount {
// TODO when CallSummary will live longer than one pulse it needs to be updated
s.sendDelegatedRequestFinished(ctx, nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the idea of setting "sendDelegatedRequestFinished" in every place where work can be stopped prematurely :)
I'd prefer to set "ErrorHandler"/"some kind of destructors" somewhere and catch all that situations at once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discuss this with @ruz and decided that this is important for pending tables. Or I can't understand your idea in second sentence.

Copy link
Contributor

@bigbes bigbes Jul 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that part of code (send pending request finished) must be executed on every exit scenario after we've received VDelegatedCallResponse

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that's a big addition, so I guess only if @ruz is OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we need some kind of destructor for this.

@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@02d09c5). Click here to learn what that means.
The diff coverage is 53.84%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #568   +/-   ##
=========================================
  Coverage          ?   61.77%           
=========================================
  Files             ?      691           
  Lines             ?    47068           
  Branches          ?        0           
=========================================
  Hits              ?    29075           
  Misses            ?    15833           
  Partials          ?     2160           
Impacted Files Coverage Δ
...core/virtual/handlers/vdelegatedrequestfinished.go 61.40% <25.00%> (ø)
ledger-core/virtual/execute/execute.go 82.94% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02d09c5...5c25098. Read the comment docs.

@bigbes bigbes removed their assignment Jul 22, 2020
@bigbes bigbes requested a review from a team July 22, 2020 21:09
@aalekseev-ru aalekseev-ru requested a review from bigbes July 23, 2020 10:11
Copy link
Contributor

@bigbes bigbes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you, also, open a ticket for some kind of destructor for SMExecute like using sm.stepSafeStop() or sm.stepSafeError? Looks like something important in the future.

@bigbes bigbes requested a review from a team July 23, 2020 10:23
@insolar-bulldozer insolar-bulldozer bot merged commit 7364d10 into master Jul 24, 2020
@insolar-bulldozer insolar-bulldozer bot deleted the PLAT-671_send_VDelegatedRequestFinished_after_retries branch July 24, 2020 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge PR is ready to be merged automatically autoupdate This branch will be automatically updated by the Bulldozer bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants