Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/meta/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -2785,7 +2785,7 @@ func (m *dbMeta) doBatchUnlink(ctx Context, parent Ino, entries []*Entry, length
case TypeFile:
entrySpace = align4K(info.n.Length)
needRecordStats = true
if delNodes[info.n.Inode].opened {
if dn, ok := delNodes[info.n.Inode]; ok && dn.opened {
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a regression test that exercises BatchUnlink/doBatchUnlink when m.sid == 0 (e.g., after NewSession(false) or without recording a session). This is the scenario that previously triggered the nil-pointer panic, and a focused test would prevent accidental reintroduction.

Copilot uses AI. Check for mistakes.
sustainedIns = append(sustainedIns, &sustained{Sid: m.sid, Inode: info.e.Inode})
if _, err := s.Cols("nlink", "ctime", "ctimensec").Update(info.n, &node{Inode: info.n.Inode}); err != nil {
return err
Expand Down
Loading