[release] v0.12.0-unstable44
This commit is contained in:
parent
73196dadf6
commit
133589b1af
|
@ -143,9 +143,9 @@ func flushAllBuffers() {
|
|||
func BufferedDBWrite(collectionName string, object map[string]interface{}) {
|
||||
bufferLock.Lock()
|
||||
writeBuffer[collectionName] = append(writeBuffer[collectionName], object)
|
||||
bufferLock.Unlock()
|
||||
|
||||
if len(writeBuffer[collectionName]) >= bufferCapacity {
|
||||
bufferLock.Unlock()
|
||||
flushBuffer(collectionName)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue