Bug #75144 Killing a command in the client-side does not kill it in the server-side
Submitted: 8 Dec 2014 17:48
Reporter: Alfranio Junior Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Fabric: Command-line Severity:S3 (Non-critical)
Version:1.4.1 OS:Any
Assigned to: CPU Architecture:Any
Tags: command-line, high-availability

[8 Dec 2014 17:48] Alfranio Junior
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.
[6 Jul 2017 19:19] Bugs System
Status updated to 'Won't fix' (Fabric is now covered under Oracle Lifetime Sustaining Support)