mirror of
https://github.com/pgsty/minio.git
synced 2026-08-09 07:43:29 +03:00
Make erasure Encode and Decode atomic to avoid races
This commit is contained in:
@@ -38,6 +38,9 @@ import (
|
||||
//
|
||||
// "dataLen" is the length of original source data
|
||||
func (e *Erasure) Decode(encodedDataBlocks [][]byte, dataLen int) (decodedData []byte, err error) {
|
||||
e.mutex.Lock()
|
||||
defer e.mutex.Unlock()
|
||||
|
||||
var source, target **C.uchar
|
||||
|
||||
k := int(e.params.K)
|
||||
|
||||
Reference in New Issue
Block a user