rgw: fix RGWSyncTraceNode crash in reload
reload or restart will finalize RGWSyncTraceManager and destroy
complete_nodes, which will trigger RGWSyncTraceNode release twice.
A situation is sync more than 4096 objects and get full complete_nodes,
complete_nodes have a member A who's parent is P which is not finished
and A is the last child of P. In destroy complete_nodes, nodes will be
released one by one.
Release A will trigger release P, and call finish_node(P). there is
trap that circular_buffer won't change size until destroy all items,
so circular_buffer is still full and pop the first item which is A,
and released A again.
fixes: http://tracker.ceph.com/issues/24432
Signed-off-by: Tianshan Qu <tianshan@xsky.com>
(cherry picked from commit
3536c7810ae1c1ed508d4eb62b08b7da0c098c07)