ONTAP Rest API Discussions

multiprocessing volume.find behavior

AdrianWa
450 Views

hi everyone, 

i have noticed that whe using mulitprocessing with python and calling "Volume.find" it sometimes happens that every process receives the same volume object from that call. i managed to handle this behavior using a "lock" that handles this and returns the correct volume to every process. 

is this something i should consider doing on all REST calls using netapp.ontap library?

i am using netapp.ontap 9.14.0.1

 

thanks

1 REPLY 1

ddegraaf
398 Views

Hello,

How are you setting up your connection? We have an existing known issue where if you use the connection object as a context manager in Python with the `with` keyword it will overwrite the connection object on other threads. This is documented under the Host connections section here. This issue will be fixed in the next release (9.15) but in the meantime please use `set_connection()` on the specific resource to avoid this issue.

 

Let me know if you have any further questions!

Daniel

Public