slave plugin queryForReplicationEvents() query needs to be ordered
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Joe Daly | ||
7.1 |
Fix Released
|
Medium
|
Joe Daly |
Bug Description
I believe the following query in the slave plugin should be ordered by commit_id the query below will be ordered by id, and this order will be used as the order that events are inserted into the queue. The id matches with trx_id which is not always ordered.
This could result in events that are read in the incorrect order by the consumer, if the timing is just right. I suspect this to be the problem with the multi-master test failures, as when I add the order clause the failures go away, but the errors don't show up outside the multi-master code so that is a little puzzling.
/*
* The SQL to pull everything we need from the master.
*/
string sql= "SELECT `id`, `segid`, `commit_id`, `message`, `message_len` "
" FROM `data_dictionar
for (size_t x= 0; x < trx_id_list.size(); x++)
{
if (x > 0)
sql.append(", ", 2);
sql.
}
sql.append(")", 1);
Related branches
- Drizzle Merge Team: Pending requested
-
Diff: 11 lines (+1/-0)1 file modifiedplugin/slave/queue_producer.cc (+1/-0)
Changed in drizzle: | |
status: | New → In Progress |
assignee: | nobody → Joe Daly (skinny.moey) |
importance: | Undecided → Medium |
Changed in drizzle: | |
status: | In Progress → Fix Committed |