Skip to content

Commit

Permalink
Get the new etag field from eos
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrizio Furano committed Oct 23, 2020
1 parent 8852a0b commit 89ddb71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/eosclientgrpc/eosclientgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func (c *Client) GetFileInfoByInode(ctx context.Context, username string, inode
return nil, errtypes.InternalError(fmt.Sprintf("nil response for inode: '%d'", inode))
}

log.Info().Uint64("inode", inode).Msg("grpc response")
log.Info().Uint64("inode", inode).Str("rsp:", fmt.Sprintf("%#v", rsp)).Msg("grpc response")

return c.grpcMDResponseToFileInfo(rsp, "")
}
Expand Down Expand Up @@ -1216,6 +1216,7 @@ func (c *Client) grpcMDResponseToFileInfo(st *erpc.MDResponse, namepfx string) (
fi.UID = st.Fmd.Uid
fi.GID = st.Fmd.Gid
fi.MTimeSec = st.Fmd.Mtime.Sec
fi.ETag = st.Fmd.Etag
if namepfx == "" {
fi.File = string(st.Fmd.Name)
} else {
Expand All @@ -1236,6 +1237,7 @@ func (c *Client) grpcMDResponseToFileInfo(st *erpc.MDResponse, namepfx string) (
fi.UID = st.Cmd.Uid
fi.GID = st.Cmd.Gid
fi.MTimeSec = st.Cmd.Mtime.Sec
fi.ETag = st.Cmd.Etag
if namepfx == "" {
fi.File = string(st.Cmd.Name)
} else {
Expand All @@ -1255,8 +1257,6 @@ func (c *Client) grpcMDResponseToFileInfo(st *erpc.MDResponse, namepfx string) (
fi.Size = 0
}

fi.ETag = fi.Attrs["etag"]

log.Debug().Str("stat info - path", fi.File).Uint64("inode:", fi.Inode).Uint64("uid:", fi.UID).Uint64("gid:", fi.GID).Str("etag:", fi.ETag).Msg("grpc response")

return fi, nil
Expand Down

0 comments on commit 89ddb71

Please sign in to comment.