Skip to content

Commit dd0fde3

Browse files
committed
add comment about syncDir
1 parent 5416bc9 commit dd0fde3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎internal/catalogd/storage/localdir.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ func (s *LocalDirV1) storeAtomicSwap(ctx context.Context, catalog string, fsys f
179179
return "", err
180180
}
181181

182+
// catalog.jsonl and index.json are fsync'd when written; syncing catalogDir and RootDir
183+
// persists directory metadata for the RemoveAll/Rename swap (file fsync alone does not).
182184
if err := syncDir(catalogDir); err != nil {
183185
return "", fmt.Errorf("error syncing catalog directory: %w", err)
184186
}

0 commit comments

Comments
 (0)