mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-20 12:40:46 +00:00
BUG/MINOR: ring: do not realign ring contents on resize
If a ring is resized, we must not zero its head since the contents are preserved in-situ. Till now it used to work because we only resize during boot and we emit very few data (if at all) during boot. But this can change in the future. This can be backported to 2.2 though no older version should notice a difference.
This commit is contained in:
parent
b7a13be6cd
commit
d0d85d2e36
@ -142,7 +142,6 @@ struct ring *ring_resize(struct ring *ring, size_t size)
|
||||
b_getblk(&ring->buf, area, ring->buf.data, 0);
|
||||
area = HA_ATOMIC_XCHG(&ring->buf.area, area);
|
||||
ring->buf.size = size;
|
||||
ring->buf.head = 0;
|
||||
}
|
||||
|
||||
HA_RWLOCK_WRUNLOCK(LOGSRV_LOCK, &ring->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user