These are chat archives for atomix/atomix

14th
Jun 2017
terrytan
@txm119161336_twitter
Jun 14 2017 05:59
blob
Jordan Halterman
@kuujo
Jun 14 2017 06:00
I’m listening
terrytan
@txm119161336_twitter
Jun 14 2017 06:04
Hi Jordan ,why is the applied index set in the finally block , let's say somehow the applyall() is not finished all index applying, it throws an exception , if we set the lastappliedindex here ,then maybe some entries are not applied actually .and there entries will never get a chance to be applied anymore ,right?
Jordan Halterman
@kuujo
Jun 14 2017 06:12
Touche, I think you have a point there
that needs to be outside the try block
err
rather, exceptions inside applyAll need to be caught and handled
terrytan
@txm119161336_twitter
Jun 14 2017 06:26
I think the setlastapplied is supposed to be at the end of the try block ,rather than finally block. But if there is one entry which cause exception forever, then the rest of the entries will never get chance to be executed ,so , we need to use try catch block in applyall() to handle the problem ,right? But currently ,i did not find such kind of process in your codes
Jordan Halterman
@kuujo
Jun 14 2017 06:28
right… well, setLastApplied needs to be done for the current entry even if an exception is thrown to ensure the system can continue to progress if something unexpected happens. If lastApplied is never incremented then it will continue to attempt to apply the bad entry repeatedly. Exceptions thrown in applyAll need to be caught and logged on a per-entry basis to ensure setLastApplied will eventually be called
terrytan
@txm119161336_twitter
Jun 14 2017 06:35
if the exception happened in applyall() ,it will be caught , and what does logged on a per-entry basis mean? only log and ignore the exception?
Jordan Halterman
@kuujo
Jun 14 2017 06:36
hmm
the server should crash fantastically if an exception makes it up that high
state machine exceptions are caught inside the state machine executor
Jordan Halterman
@kuujo
Jun 14 2017 06:43
I can’t exactly think if a reason to allow the server to continue if an exception is thrown at that level