filer.sync: include last error in stall diagnostics
This commit is contained in:
@@ -375,8 +375,13 @@ func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, sourceGrpcDi
|
|||||||
lastLogTsNs = now
|
lastLogTsNs = now
|
||||||
if offsetTsNs == lastProgressedTsNs {
|
if offsetTsNs == lastProgressedTsNs {
|
||||||
for _, t := range filerSink.ActiveTransfers() {
|
for _, t := range filerSink.ActiveTransfers() {
|
||||||
glog.V(0).Infof(" %s %s: %d bytes received, %s",
|
if t.LastErr != "" {
|
||||||
t.ChunkFileId, t.Path, t.BytesReceived, t.Status)
|
glog.V(0).Infof(" %s %s: %d bytes received, %s, last error: %s",
|
||||||
|
t.ChunkFileId, t.Path, t.BytesReceived, t.Status, t.LastErr)
|
||||||
|
} else {
|
||||||
|
glog.V(0).Infof(" %s %s: %d bytes received, %s",
|
||||||
|
t.ChunkFileId, t.Path, t.BytesReceived, t.Status)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastProgressedTsNs = offsetTsNs
|
lastProgressedTsNs = offsetTsNs
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ func (fs *FilerSink) fetchAndWrite(sourceChunk *filer_pb.FileChunk, path string,
|
|||||||
glog.V(1).Infof("skip retrying stale source %s for %s: %v", sourceChunk.GetFileIdString(), path, retryErr)
|
glog.V(1).Infof("skip retrying stale source %s for %s: %v", sourceChunk.GetFileIdString(), path, retryErr)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
transferStatus.LastErr = retryErr.Error()
|
||||||
if isEofError(retryErr) {
|
if isEofError(retryErr) {
|
||||||
eofBackoff = nextEofBackoff(eofBackoff)
|
eofBackoff = nextEofBackoff(eofBackoff)
|
||||||
transferStatus.BytesReceived = int64(len(partialData))
|
transferStatus.BytesReceived = int64(len(partialData))
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ type ChunkTransferStatus struct {
|
|||||||
Path string
|
Path string
|
||||||
BytesReceived int64
|
BytesReceived int64
|
||||||
Status string // "downloading", "uploading", or "waiting 10s" etc.
|
Status string // "downloading", "uploading", or "waiting 10s" etc.
|
||||||
|
LastErr string
|
||||||
}
|
}
|
||||||
|
|
||||||
type FilerSink struct {
|
type FilerSink struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user