wangpf

Results 5 comments of wangpf

> [![CLA assistant check](https://camo.githubusercontent.com/4c970efeed75dd01f6778bf7e33dec85e4171375cb69acb0927bfc9d437d78d9/68747470733a2f2f636c612d617373697374616e742e696f2f70756c6c2f62616467652f6e6f745f7369676e6564)](https://cla-assistant.io/PaddlePaddle/PaddleOCR?pullRequest=6397) Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our [Contributor License Agreement](https://cla-assistant.io/PaddlePaddle/PaddleOCR?pullRequest=6397) before we...

``` AddFunc: func(obj interface{}) { wfc.wfQueue.AddRateLimited(obj) }, ``` 如果直接往队列里加obj的话,会导致内存持续增加,并且不会被gc回收,但是调整到只添加cache的索引key时问题就可以被解决,有大佬遇到过这种问题吗?

> > ``` > > AddFunc: func(obj interface{}) { > > wfc.wfQueue.AddRateLimited(obj) > > }, > > ``` > > > > > > > > > > > >...

> > 我找到原因了,在workqueue内部存在 `failures map[interface{}]int` 用于统计的map,需要手动调用forget的方法,之前只在失败时会触发,导致map持续增加。 > > Forget() 在 reconcile 成功结束时调用。失败时需要 requeue 来 backoff,不应该 forget。 > > 另外,workqueue 中的 Get() 和 defer Done() 配套使用 我看了下`client-go`这块的处理逻辑,Done()的时候不会调用到Forget方法,看官方的示例,也确实需要手动调用Forget方法。

> 我小白式提问一下哈:突然想到 如果使用obj加入队列,能确保“整个pod”字段都不变吗?经过控制器调谐后 例如版本号这种应该也会变?这样哈希能哈希到原对象吗? 确保不了。大概率是哈希不到的。