coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.78k stars 172 forks source link

file: tiny: output trace log before call writeToBlock #422

Open nak3 opened 7 years ago

lpabon commented 7 years ago

Why is this change needed?

nak3 commented 7 years ago

There are several reasons.

For example, writeToBlock() in file_cache.go#L92 has a panic() call. If this panic() is called before the trace log, we cannot see the blkIndex which caused the issue. Read in file.go#L274-L277 implements this correctly.