Thanks for the comments! Yes, it is rally case and hard to reproduce. From code level: in reserve_provider_segment -> allocate_partially_specified_segment, if multiple process/threads call
count = (session.query(self.model).filter_by(allocated=False, **raw_segment). update({"allocated": True}))
concurrently, it may casused the same segment be allocated to differet networks, the code:
alloc = random.choice(allocs)
can help to reduce the possibility, but it still have the possibility for this issue.
We are found the issue with a customized type driver which do not select the segment randomly, Let me try to see whether I can get some logs for you.
And do you know if community had some solution for such issue? Thanks!
Thanks for the comments! Yes, it is rally case and hard to reproduce. provider_ segment -> allocate_ partially_ specified_ segment, if multiple process/threads call
From code level:
in reserve_
count = (session. query(self. model). filter_ by(allocated= False, **raw_segment). update( {"allocated" : True}))
concurrently, it may casused the same segment be allocated to differet networks, the code:
alloc = random. choice( allocs)
can help to reduce the possibility, but it still have the possibility for this issue.
We are found the issue with a customized type driver which do not select the segment randomly, Let me try to see whether I can get some logs for you.
And do you know if community had some solution for such issue? Thanks!