mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-12 09:30:46 +02:00
debug: add detailed buffer tracking to identify lost 78 bytes
Issue: Parquet expects 1338 bytes but SeaweedFS only has 1260 bytes (78 missing) Added logging to track: - Buffer position before every write - Bytes submitted for write - Whether buffer is skipped (position==0) This will show if: 1. The last 78 bytes never entered the buffer (Parquet bug) 2. The buffer had 78 bytes but weren't written (flush bug) 3. The buffer was written but data was lost (volume server bug) Next step: Force rebuild in CI to get these logs.
This commit is contained in:
@@ -209,11 +209,16 @@ public class SeaweedOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
private synchronized void writeCurrentBufferToService() throws IOException {
|
||||
if (buffer.position() == 0) {
|
||||
int bufferPos = buffer.position();
|
||||
LOG.info("writeCurrentBufferToService: path={} buffer.position()={} totalPosition={}", path, bufferPos, position);
|
||||
if (bufferPos == 0) {
|
||||
LOG.info(" → Skipping write, buffer is empty");
|
||||
return;
|
||||
}
|
||||
|
||||
position += submitWriteBufferToService(buffer, position);
|
||||
int written = submitWriteBufferToService(buffer, position);
|
||||
position += written;
|
||||
LOG.info(" → Submitted {} bytes for write, new position={}", written, position);
|
||||
|
||||
buffer = ByteBufferPool.request(bufferSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user