Hao, I noticed the same behavior when stress-testing the multi thread session handling for the ACL plugin a while ago. I thought this trade off is there to avoid having to do the hard locks in bihash code, rather than it being a bug.
As you say - the special value comes only if the deletion is in progress, and it is always the same. So I just treated that case in my code same as “not found”. My logic was: if an entry is just in process of being deleted, there is very little use for its old value anyway. --a > On 15 Mar 2023, at 14:45, Hao Tian <tianhao...@outlook.com> wrote: > > Hi, > > I tried but could not come up with any way that is able to ensure the kvp > being valid upon return without using the full bucket lock. > > Maybe we can make a copy of the value before returning, validate the copy and > return that copy instead. Critical section can be shrinked to cover only the > copying process, which seems to perform better, but I'm not sure if this is > the best approach. > > Could you please shed some light here? Thanks! > > Regards, > Hao Tian >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22710): https://lists.fd.io/g/vpp-dev/message/22710 Mute This Topic: https://lists.fd.io/mt/97599770/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-