That was an impressive analysis and, IMO, correct.
I think we can implement both measures:
- Store a string in the "needs_resync_reasons" dict. There is no need to waist space storing the whole exception instance.
- In "_periodic_resync_helper" we are creating a new "needs_resync_reasons" dictionary and using the older one to pass the network IDs. Back in py27 that wasn't a problem but in py36 ".keys()" is a generator that implies passing a copy of the dictionary. In any case, it is safer just to pass a new generated list.
Hello Xiaojun:
That was an impressive analysis and, IMO, correct.
I think we can implement both measures: resync_ reasons" dict. There is no need to waist space storing the whole exception instance. resync_ helper" we are creating a new "needs_ resync_ reasons" dictionary and using the older one to pass the network IDs. Back in py27 that wasn't a problem but in py36 ".keys()" is a generator that implies passing a copy of the dictionary. In any case, it is safer just to pass a new generated list.
- Store a string in the "needs_
- In "_periodic_
Thanks a lot for this detailed bug description.