Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions regarding how beginners can understand the detailed design related to garbage collection in the Titan source code. #327

Open
Yxlfe opened this issue Aug 29, 2024 · 1 comment

Comments

@Yxlfe
Copy link

Yxlfe commented Aug 29, 2024

Hello, as a beginner in Titan, I haven't found any detailed design documents related to Titan. While researching the relevant design in the source code, I found it difficult to understand some of the explanations in the comments. For example, in the enum class FileState : int:

enum class FileState : int {
kInit, // file never at this state
kNormal,
kPendingLSM, // waiting keys adding to LSM
kBeingGC, // being gced
kPendingGC, // output of gc, waiting gc finish and keys adding to LSM
kObsolete, // already gced, but wait to be physical deleted
kToMerge, // need merge to new blob file in next compaction
};

I am having trouble understanding the difference between the kPendingLSM and kPendingGC states in terms of their specific scenarios. Please answer my question regarding kPendingLSM and kPendingGC, and if possible, provide a link to the relevant detailed design documents. I would greatly appreciate it.

@Connor1996
Copy link
Member

There is no detailed design for FileState.
For kPendingLSM, the blob file is created during flush.
For kPendingGC, the blob file is created during GC,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants