Closed payes closed 3 years ago
This PR adds a lock to protect SCSIIOCount map from being updated and iterated at the same time. The caller of Stats() func might be iterating the SCSIIOCount map while the IOs are going on, which leads to a crash.
reflect.mapiternext(0xc004a9ae40) runtime.throw(0xb06e45, 0x26) fatal error: concurrent map iteration and map write
Signed-off-by: Payes Anand payes.anand@mayadata.io
Thanks @payes @utkarshmani1997
This PR adds a lock to protect SCSIIOCount map from being updated and iterated at the same time. The caller of Stats() func might be iterating the SCSIIOCount map while the IOs are going on, which leads to a crash.
Signed-off-by: Payes Anand payes.anand@mayadata.io