hollywood icon indicating copy to clipboard operation
hollywood copied to clipboard

Use `nproc` for clarity and add a unit test to verify that the message causing the crash is dropped

Open mapogolions opened this issue 1 year ago • 3 comments

Use nproc for clarity and add a unit test to verify that the message causing the crash is dropped

mapogolions avatar Jan 25 '25 12:01 mapogolions

Interesting. Thanks will look into this today. Thanks!!

anthdm avatar Jan 25 '25 17:01 anthdm

I see what you mean here. But is dropping the message that caused the crash the correct behaviour? Maybe its an internal state that is corrupt that has nothing to do with the message that has just been processed and caused the crash. Maybe a restart and restoring the actor back from its state in the DB, could not crash anymore on the message that crashed it.

What are your thoughts?

@tprifti

anthdm avatar Jan 29 '25 15:01 anthdm

It is important to understand that the algorithm has not changed at all. I have merely reordered the variables to explain why the increment of nproc at the end of the loop and its usage in recovery caused some tests to freeze. The added test will successfully pass on the code from the master branch. The current implementation (master branch) follows a minimalist paradigm, which assumes that if a message is read but cannot be processed, we simply move on to the next one.

mapogolions avatar Jan 29 '25 19:01 mapogolions