Skip to content

Commit

Permalink
PaddlePaddle#1355 🐛bug: fix cache time null
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkeyman520 committed Feb 19, 2025
1 parent b51a111 commit 2278346
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/fs/client/meta/meta_kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,13 @@ func (m *kvMeta) Symlink(ctx *Context, parent Ino, name string, path string, ino
insertInodeItem_.name = []byte(name)
// link设置无限大时间,永远不过期
insertInodeItem_.expire = now.Add(time.Hour * 876000).Unix()
// 设置所有时间戳
insertInodeItem_.attr.Atime = now.Unix()
insertInodeItem_.attr.Mtime = now.Unix()
insertInodeItem_.attr.Ctime = now.Unix()
insertInodeItem_.attr.Atimensec = uint32(now.Nanosecond())
insertInodeItem_.attr.Mtimensec = uint32(now.Nanosecond())
insertInodeItem_.attr.Ctimensec = uint32(now.Nanosecond())

ino, err := m.nextInode()
*inode = ino
Expand Down

0 comments on commit 2278346

Please sign in to comment.