Fix transaction replay checksum mismatches
The transaction replay could get mixed up with new queries if the client managed to perform one while the delayed routing was taking place. A proper way to solve this would be to cork the client DCB until the transaction is fully replayed. As this change would be relatively more complex compared to simply labeling queries that are being retried the corking implementation is left for later when a more complete solution can be designed. This commit also adds some of the missing info logging for the transaction replaying which makes analysis of failures easier.
This commit is contained in:
@ -55,6 +55,7 @@ typedef enum
|
||||
GWBUF_TYPE_COLLECT_RESULT = (1 << 2),
|
||||
GWBUF_TYPE_RESULT = (1 << 3),
|
||||
GWBUF_TYPE_REPLY_OK = (1 << 4),
|
||||
GWBUF_TYPE_REPLAYED = (1 << 5),
|
||||
} gwbuf_type_t;
|
||||
|
||||
#define GWBUF_IS_TYPE_UNDEFINED(b) ((b)->gwbuf_type == 0)
|
||||
@ -63,6 +64,9 @@ typedef enum
|
||||
#define GWBUF_SHOULD_COLLECT_RESULT(b) ((b)->gwbuf_type & GWBUF_TYPE_COLLECT_RESULT)
|
||||
#define GWBUF_IS_REPLY_OK(b) ((b)->gwbuf_type & GWBUF_TYPE_REPLY_OK)
|
||||
|
||||
// True if the query is not initiated by the client but an internal replaying mechanism
|
||||
#define GWBUF_IS_REPLAYED(b) ((b)->gwbuf_type & GWBUF_TYPE_REPLAYED)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GWBUF_INFO_NONE = 0x0,
|
||||
|
||||
Reference in New Issue
Block a user