Previously we add lock on subnet to prevent the race between SubnetPort/Pod controller and SubnetSet GC. In this PR we replace the mutex lock by read-write lock to improve the parallelism of the SubnetPort creation.
Testing done:
Created 32 SubnetPort at a time, each SubnetPort reconcile finished in 2-3 seconds
Previously we add lock on subnet to prevent the race between SubnetPort/Pod controller and SubnetSet GC. In this PR we replace the mutex lock by read-write lock to improve the parallelism of the SubnetPort creation.
Testing done: Created 32 SubnetPort at a time, each SubnetPort reconcile finished in 2-3 seconds