INTERNAL: Fix misleading status comment in btree_elem_item#967
Merged
jhpark816 merged 1 commit intonaver:developfrom Apr 9, 2026
Merged
INTERNAL: Fix misleading status comment in btree_elem_item#967jhpark816 merged 1 commit intonaver:developfrom
jhpark816 merged 1 commit intonaver:developfrom
Conversation
Collaborator
|
bug fix는 아니어서 아래와 같이 commit message 변경하면 좋겠습니다. |
The old comment listed incorrect values (3/2/1/0) that didn't match the actual implementation (USED=2, UNLINK=1, FREE=0). Replace with a description of the lifecycle states instead of enumerating the values.
e0d0172 to
dff1224
Compare
Author
|
변경하였습니다. |
namsic
reviewed
Apr 9, 2026
| uint16_t refcount; | ||
| uint8_t slabs_clsid; /* which slab class we're in */ | ||
| uint8_t status; /* 3(used), 2(insert mark), 1(delete_mark), or 0(free) */ | ||
| uint8_t status; /* element lifecycle state: used(in-tree), unlinked(removed but referenced), or free */ |
Collaborator
There was a problem hiding this comment.
헤더에서 각 값의 의미를 드러내지 않고, status 필드의 용도만 설명하시죠.
이후에 status 값의 의미가 변경될 가능성은 낮지만,
/* element lifecycle state */ 정도로만 작성해두면 좋겠습니다.
Collaborator
There was a problem hiding this comment.
각 필드 값의 의미를 두는 것이 괜찮아 보입니다.
jhpark816
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issue
⌨️ What I did
btree_elem_item구조체의status필드 주석이 실제 lifecycle 상태값과 맞지 않아 오해를 유발할 수 있었습니다.item_base.h의 주석을 실제 사용 방식(used/unlinked/free lifecycle)에 맞게 수정했습니다.