lua: separate sched and script diag
When Lua main script was launched, the sched fiber passed its own diag to the script's fiber. When the script was finished, it put its error into the diag. The sched fiber then checked if the diag is empty to detect an error. But it wasn't really correct. The error could also happen right in the scheduler fiber in a libev callback. For example, in one of ev_io callbacks in SWIM. Then the process would end with an error even if the script was finished successfully. These errors were not related to the main fiber executing the script. The patch makes so the scheduler fiber's diag no longer is used as an indication of an error in the script. Instead, a new diag is created on the stack of the scheduler's fiber, where the Lua script saves the error. Closes #5864
Please register or sign in to comment