cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dispatch of a transaction question

ybizane
Retired

hi ,

i have a question:

During the dispatching of a transaction, when a user loses his/her network connection or he / she cancels it, what will happen technically at the backend?
For example, I need to dispatch 500 commands, and cancel / lose my connection when it finishes dispatching at 250 commands, will MEGA roll back all the updates, in which the 250 commands dispatched earlier will not be taken into account / updated in the repository?

 

thks

2 Replies

Thank you for your prompt response , it's very clear now.

jhorber
MEGA
MEGA

Hello Yassir

 

Good question

 

Here are the design choices for dispatch

  • There is a global commit (global 'flush') of the the transaction updates.
  • Once the commit is made, the transaction is deleted.

In other words, the transaction is kept as long as the dispatch is not complete.

 

This means that

 

If a network error occurs before the transaction is fully dipatched

  • The repository is not updated.
  • The transaction is kept with all its updates

For example, if an error is met when dispatching a transaction with 500 commands

  • None of the 500 commands is published is the repository (public state)
  • The transaction still contains the 500 commands

If a network error occurs just after the transaction is fully dipatched

  • The repository is updated.
  • The transaction can be kept with all its updates (not yet deleted) 
Jerome