Description:
Users expect that after pressing crtl+c and aborting a request, it will be aborted on the client-side and server-side as well. However, this is not happening and killing a command on the client-side does not kill it on the server-side.
Besides, killing MySQL Fabric does not fix the issue either as the recovery will resume the activities from the point where they were left.
So if a computation hangs for any reason, we will have to kill MySQL Fabric, update the state store manually in order to remove any undesirable activity (i.e. hanging activity) and then restart MySQL Fabric.
See also BUG#74555.
How to repeat:
1 - Add the following code to a module in the "mysql/fabric/services/" package.
TESTING_GROUP = Event()
class GroupTesting(ProcedureGroup):
group_name = "group"
command_name = "testing"
def execute(self, group_id, synchronous=True):
procedures = trigger(
TESTING_GROUP, self.get_lockable_objects(), group_id
)
return self.wait_for_procedures(procedures, synchronous)
@on_event(TESTING_GROUP)
def _testing_group(group_id):
import time
while True:
time.sleep(5)
print "Doing something"
2 - Install and run MySQL Fabric
3 - Execute "mysqlfabric group testing my_group"
4 - Kill the command and check the server-side.
5 - Try to kill MySQL Fabric and restart it.
Suggested fix:
Create a patch taking the following into consideration:
1 - Killing a command on the client-side should kill it on the server-side as well.
2 - Create a command to kill other commands
3 - It should be possible to kill MySQL Fabric and ignore any on-going activities after restarting it.