-
Joao Gramacho authored
THREADS HOOKS Problem: In order to know when receiver and applier thread have stopped, a plug-in (like GR) can monitor thread stop activities by registering to be notified by replication thread stop hooks. A common scenario is to: 1) start the replications threads; 2) register to monitor thread stop activities; 3) check if the thread stopped between 1 and 2. This is necessary because thread start command can succeed but the thread might fail right after trying to start work. Unfortunately for step 3 above, the way channel service interface offer to know if the thread has stopped may provide an information stating the replication thread is still active when it is about to stop, after passing the thread stop hook. In this case, the step 3 above would obtain that the thread didn't stopped, but it will soon and will not notify the monitoring thread because the thread stop hook point has passed. Fix: Created a new status variable at rpl_info object to state if the replication thread (either applier or receiver thread) is stopping or not. Created a new function at channel service interface to get the "is_stopping" information from the replication threads.
Joao Gramacho authoredTHREADS HOOKS Problem: In order to know when receiver and applier thread have stopped, a plug-in (like GR) can monitor thread stop activities by registering to be notified by replication thread stop hooks. A common scenario is to: 1) start the replications threads; 2) register to monitor thread stop activities; 3) check if the thread stopped between 1 and 2. This is necessary because thread start command can succeed but the thread might fail right after trying to start work. Unfortunately for step 3 above, the way channel service interface offer to know if the thread has stopped may provide an information stating the replication thread is still active when it is about to stop, after passing the thread stop hook. In this case, the step 3 above would obtain that the thread didn't stopped, but it will soon and will not notify the monitoring thread because the thread stop hook point has passed. Fix: Created a new status variable at rpl_info object to state if the replication thread (either applier or receiver thread) is stopping or not. Created a new function at channel service interface to get the "is_stopping" information from the replication threads.
Loading