Confusion About Prune Session Logic
- Dominant language
- C++
- Stars
- 10.2k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I read the code for prune session and observed the following:
1. [`MetaClient`](https://github.com/deepseek-ai/3FS/blob/cd564a239a28cc51e55c1550099824b3d7903dd3/src/client/meta/MetaClient.cc#L590) sends a prune session request to the server when `openCreate` fails for some unknown reason (possibly indicating uncertainty about whether the file session was created?).
2. The [`PruneSessionOp`](https://github.com/deepseek-ai/3FS/blob/cd564a239a28cc51e55c1550099824b3d7903dd3/src/meta/store/ops/PruneSession.cc#L64) writes a key in the format `INOS.-1.` to FDB.
3. The [`SessionManager`](https://github.com/deepseek-ai/3FS/blob/cd564a239a28cc51e55c1550099824b3d7903dd3/src/meta/components/SessionManager.cc#L172) scans for `INOS.-1.` during [`loadPrune`](https://github.com/deepseek-ai/3FS/blob/cd564a239a28cc51e55c1550099824b3d7903dd3/src/meta/components/SessionManager.cc#L274) and removes these keys.
However, I am unclear about the purpose of adding the `INOS.-1.` key to FDB only to remove it later. I suspect I might be missing something - perhaps 3FS performs additional operations while scanning for `INOS.-1.` keys?
Any clarification on this logic would be greatly appreciated.
Thanks for your clarification.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.