kingluo commented on issue #9822:
URL: https://github.com/apache/apisix/issues/9822#issuecomment-1632030056

   This bug is due to the iteration of boolean items.
   
   To avoid moving table (self.values) items frequently, we append the new 
items only to the table.
   
   
https://github.com/apache/apisix/blob/69df734902782f6e12386dc505a40a5e64524154/apisix/core/config_etcd.lua#L478
   
   When the size of the table exceeds 100, the obsoleted items will be cleared. 
Before the clear, if the compacted event happens, it will iterate the 
self.values to invoke all clean handlers, which involves the false item and 
break the type assertion.
   
   
https://github.com/apache/apisix/blob/69df734902782f6e12386dc505a40a5e64524154/apisix/core/config_etcd.lua#L376
   
   So the bugfix is to skip the false items.
   
   BTW, in the [new watch 
mechanism](https://github.com/apache/apisix/pull/9456), no compacted event 
happens anymore, because we watch the whole apisix keyspace, not individual 
watching for each admin resource. So this bug will be not triggered anymore.
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to