BUG/MINOR: peers: some updates are pushed twice after a resync.

This bug is due to a copy/paste error and was introduced
with peers-protocol v2:

The last_pushed pointer was not correctly reset to the teaching_origin at
the end of the teaching state but to the first update present in the tree.

The result: some updates were re-pushed after leaving the teaching state.

This fix needs to be backported to 1.6.
This commit is contained in:
Emeric Brun 2016-08-10 17:19:27 +02:00 committed by Willy Tarreau
parent 16e015635c
commit cc52274496
1 changed files with 1 additions and 3 deletions

View File

@ -1491,9 +1491,7 @@ static void peer_io_handler(struct appctx *appctx)
/* push local updates */
if (!eb || eb->key > st->teaching_origin) {
st->flags |= SHTABLE_F_TEACH_STAGE2;
eb = eb32_first(&st->table->updates);
if (eb)
st->last_pushed = eb->key - 1;
st->last_pushed = st->teaching_origin;
break;
}