[GH-ISSUE #108] Confusion About Prune Session Logic #63

Open
opened 2026-10-26 09:44:23 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Clcanny on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/108

I read the code for prune session and observed the following:

  1. MetaClient 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 writes a key in the format INOS.-1.<sessionId> to FDB.
  3. The SessionManager scans for INOS.-1.<sessionId> during loadPrune and removes these keys.

However, I am unclear about the purpose of adding the INOS.-1.<sessionId> 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.<sessionId> keys?

Any clarification on this logic would be greatly appreciated.

Thanks for your clarification.

Originally created by @Clcanny on GitHub (Mar 5, 2025). Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/108 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.<sessionId>` to FDB. 3. The [`SessionManager`](https://github.com/deepseek-ai/3FS/blob/cd564a239a28cc51e55c1550099824b3d7903dd3/src/meta/components/SessionManager.cc#L172) scans for `INOS.-1.<sessionId>` 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.<sessionId>` 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.<sessionId>` keys? Any clarification on this logic would be greatly appreciated. Thanks for your clarification.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/3FS#63
No description provided.