Open mhkarimi1383 opened 1 year ago
In https://github.com/mhkarimi1383/simple-store/blob/fd4c211a2dc05fd24fbe043758741d0580c6ef36/internal/filemanager/filemanager.go#L34 we are chunking files and saving them is File System using os package
os
but there is some bytes that are losing in the middle or the last parts of the file and after saving files are being corrupted
here https://github.com/mhkarimi1383/simple-store/blob/789b3dbc5084cfeda9ecec5667f95acc7ed6d30d/internal/filemanager/filemanager.go#L71
if we get EOF error written value is wrong but that's not related to our problem since we are not using it for now
as my tests the problem is happening when you put chunk size to a big value
In https://github.com/mhkarimi1383/simple-store/blob/fd4c211a2dc05fd24fbe043758741d0580c6ef36/internal/filemanager/filemanager.go#L34 we are chunking files and saving them is File System using
os
packagebut there is some bytes that are losing in the middle or the last parts of the file and after saving files are being corrupted