Simplify DCB writing code
Due to the changes in the threading model, the DCB write code can be simplified by a great amount. Since only one thread can write to a DCB, it's safe to assume that no new data is added to the write queue of a DCB while it is being drained. This removes the need for the code that tracks whether a concurrent DCB write attempt was made. Because the high and low water callbacks weren't used by any module, it is safe to remove them. They offer no real benefits over the drain callback.
This commit is contained in:
@ -187,8 +187,6 @@ typedef struct dcb
|
||||
skygw_chk_t dcb_chk_top;
|
||||
bool dcb_errhandle_called; /*< this can be called only once */
|
||||
bool dcb_is_zombie; /**< Whether the DCB is in the zombie list */
|
||||
bool draining_flag; /**< Set while write queue is drained */
|
||||
bool drain_called_while_busy; /**< Set as described */
|
||||
dcb_role_t dcb_role;
|
||||
DCBEVENTQ evq; /**< The event queue for this DCB */
|
||||
int fd; /**< The descriptor */
|
||||
@ -221,8 +219,6 @@ typedef struct dcb
|
||||
DCBMM memdata; /**< The data related to DCB memory management */
|
||||
DCB_CALLBACK *callbacks; /**< The list of callbacks for the DCB */
|
||||
long last_read; /*< Last time the DCB received data */
|
||||
int high_water; /**< High water mark */
|
||||
int low_water; /**< Low water mark */
|
||||
struct server *server; /**< The associated backend server */
|
||||
SSL* ssl; /*< SSL struct for connection */
|
||||
bool ssl_read_want_read; /*< Flag */
|
||||
|
Reference in New Issue
Block a user