On 2013/8/13 22:54, Willy Tarreau wrote:
Hi guys,
On Thu, Aug 08, 2013 at 08:48:53PM +0800, Godbach wrote:
On 2013/8/8 18:50, Mark Brooks wrote:
The issue I am seeing is that using the dev version of HAProxy
1.5-dev19 git commit id 00f0084752eab236af80e61291d672e835790cff
I have a source IP stick table and im trying to drop specific entries
>from it but its resulting in the whole table being dropped each time.
(...)
I got it, it's a stupid fix for a previous bug that was killing a bit
too much this time.
Here's the fix.
Best regards,
Willy
Hi Willy,
I have done a new test with this patch, it works well now.
Yes, just do the same test as last node for other nodes to be removed. I
had tried to fixed it just by testing skip_entry but forgetten to test
si->applet.ctx.table.entry->ref_cnt. And the test condition should have
been found for the last node.
There is another issue I want to make sure. There are nodes to be
deleted even in 'show table' action if expired as below:
eb = ebmb_next(&si->applet.ctx.table.entry->key);
if (eb) {
struct stksess *old = si->applet.ctx.table.entry;
si->applet.ctx.table.entry = ebmb_entry(eb, struct stksess, key);
if (show)
stksess_kill_if_expired(&si->applet.ctx.table.proxy->table, old);
else if (!skip_entry && !si->applet.ctx.table.entry->ref_cnt)
stksess_kill(&si->applet.ctx.table.proxy->table, old);
si->applet.ctx.table.entry->ref_cnt++;
break;
}
If the expired nodes are not removed here, they can still be removed in
expiration task by calling process_table_expire(). So the idea to remove
expired nodes in 'show table' action can make process_table_expire() do
less work.
--
Best Regards,
Godbach