Browse Source

debug: add rename logging - proves metadata IS preserved correctly

CRITICAL FINDING:
Rename operation works perfectly:
- Source: size=1260 chunks=1
- Destination: size=1260 chunks=1
- Metadata is correctly preserved!

The EOF error occurs DURING READ, not after rename.
Parquet tries to read at position=1260 with bufRemaining=78,
meaning it expects file to be 1338 bytes but it's only 1260.

This proves the issue is in how Parquet WRITES the file,
not in how SeaweedFS stores or renames it.

The Parquet footer contains incorrect offsets that were
calculated during the write phase.
pull/7526/head
chrislu 1 week ago
parent
commit
580a6c1e00
  1. 29
      other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystemStore.java

29
other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystemStore.java

@ -161,13 +161,40 @@ public class SeaweedFileSystemStore {
if (source.isRoot()) { if (source.isRoot()) {
return; return;
} }
LOG.info("rename source: {} destination:{}", source, destination);
LOG.warn("[DEBUG-2024] RENAME START: {} => {}", source, destination);
FilerProto.Entry entry = lookupEntry(source); FilerProto.Entry entry = lookupEntry(source);
if (entry == null) { if (entry == null) {
LOG.warn("rename non-existing source: {}", source); LOG.warn("rename non-existing source: {}", source);
return; return;
} }
// Log source file metadata before rename
long sourceSize = entry.getAttributes().getFileSize();
int sourceChunks = entry.getChunksCount();
LOG.warn("[DEBUG-2024] Source file metadata: size={} chunks={}", sourceSize, sourceChunks);
filerClient.mv(source.toUri().getPath(), destination.toUri().getPath()); filerClient.mv(source.toUri().getPath(), destination.toUri().getPath());
LOG.warn("[DEBUG-2024] RENAME COMPLETE: {} => {}", source, destination);
// Lookup destination to verify metadata was preserved
FilerProto.Entry destEntry = lookupEntry(destination);
if (destEntry != null) {
long destSize = destEntry.getAttributes().getFileSize();
int destChunks = destEntry.getChunksCount();
LOG.warn("[DEBUG-2024] Destination file metadata: size={} chunks={}", destSize, destChunks);
if (sourceSize != destSize) {
LOG.error("[DEBUG-2024] METADATA MISMATCH! Source size={} but destination size={}",
sourceSize, destSize);
}
if (sourceChunks != destChunks) {
LOG.error("[DEBUG-2024] CHUNK COUNT MISMATCH! Source chunks={} but destination chunks={}",
sourceChunks, destChunks);
}
} else {
LOG.error("[DEBUG-2024] Destination file not found after rename!");
}
} }
public OutputStream createFile(final Path path, public OutputStream createFile(final Path path,

Loading…
Cancel
Save