MXS-1376 Really close a DCB only at the end of event loop
When dcb_close() is called, the DCB is only marked for closing and the actual closing takes place only after all event handlers have been called. That way, the state of the DCB will not change during event processing but only after. From a handler perspective this should now be just like it was when the zombie queue was present. TODO: There are far too many state variables or variables akin to state variables - dcb_role, state, persistentstart, n_close - in DCB. A cleanup is warranted.
This commit is contained in:
@ -180,6 +180,7 @@ typedef struct dcb
|
||||
struct dcb *next; /**< Next DCB in owning thread's list */
|
||||
struct dcb *tail; /**< Last DCB in owning thread's list */
|
||||
} thread;
|
||||
uint32_t n_close; /** How many times dcb_close has been called. */
|
||||
skygw_chk_t dcb_chk_tail;
|
||||
} DCB;
|
||||
|
||||
|
Reference in New Issue
Block a user