Skip to content

INTERNAL: Separate hash tree operations from collection state updates in map/set#977

Open
zhy2on wants to merge 3 commits into
naver:developfrom
zhy2on:internal/refactor-map-set-link-unlink
Open

INTERNAL: Separate hash tree operations from collection state updates in map/set#977
zhy2on wants to merge 3 commits into
naver:developfrom
zhy2on:internal/refactor-map-set-link-unlink

Conversation

@zhy2on

@zhy2on zhy2on commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

🔗 Related Issue

⌨️ What I did

  • 향후 set, map, zset이 공유하는 hash_tree 모듈 추출을 위한 사전 작업을 진행했습니다. zset은 하나의 elem을 btree와 hash tree 두 자료구조에 모두 연결하므로 CLOG/ccnt/space accounting/elem status 업데이트는 collection 단에서 한 번만 이뤄져야 합니다.
  • map/set의 elem_link, unlink, replace에서 hash tree 구조 조작과 collection 상태 업데이트(CLOG, ccnt, space accounting, elem status)를 분리했습니다.

향후 작업

  • do_htree_elem_link에 있는 sticky overflow, overflow check를 collection 단의 작업(do_{map, set}_elem_link 내부)으로 빼냅니다.
  • htree_elem_link: 현재 root가 NULL일 시 외부에서 root node를 생성해준 후 htree_elem_link를 하고 있습니다. hash tree 모듈에서는 node 관련 작업을 hash tree 단에서 해주어야 하므로 노드를 새로 생성하는 로직을 내부로 통합합니다.
  • htree_elem_unlink: unlink 후 node의 elem이 sparse해지면 par_node의 체인으로 흡수하는 로직을 통합합니다.

zhy2on added 3 commits June 8, 2026 12:08
- CLOG → ccnt → space accounting → elem status
- CLOG → ccnt → space accounting → elem status
@zhy2on zhy2on requested a review from jhpark816 June 8, 2026 06:12
@jhpark816

Copy link
Copy Markdown
Collaborator

@zhy2on
htree 모듈에서 제공할 함수를 따로 알려주세요.

@jhpark816 jhpark816 requested review from namsic and removed request for namsic June 8, 2026 07:37
@jhpark816

jhpark816 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

아래와 같이 예상하고 있는 데, 참고 바랍니다.

  • CLOG - set/map 수준에서 수행
  • ccnt - set/map 수준에서 수행 (100%)
  • space accounting - htree 내부에서 수행하는 방안을 찾아 보면 좋겠음
  • elem status - htree 내부에서 수행

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

Successfully merging this pull request may close these issues.

2 participants