[release] v0.12.0-unstable44

This commit is contained in:
Yann Stepienik 2023-11-06 20:11:15 +00:00
parent 73196dadf6
commit 133589b1af

View file

@ -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)
}
}