Skip to content

FEATURE: Add CompletableFuture BTree position APIs#1064

Merged
jhpark816 merged 1 commit intonaver:developfrom
f1v3-dev:feat/v2-btree-position
Apr 2, 2026
Merged

FEATURE: Add CompletableFuture BTree position APIs#1064
jhpark816 merged 1 commit intonaver:developfrom
f1v3-dev:feat/v2-btree-position

Conversation

@f1v3-dev
Copy link
Copy Markdown
Collaborator

@f1v3-dev f1v3-dev commented Mar 25, 2026

🔗 Related Issue

⌨️ What I did

BTree Position 조회 API 추가

  • 특정 element의 위치(position)을 조회하거나, position을 기반으로 element를 조회하는 3가지 API를 구현하였습니다.
    1. bopGetPosition: bKey가 일치하는 element의 position 반환
    2. bopGetByPosition (gbp): 단건 - position에 맞는 element 반환 / 범위 - 범위 내의 Map<position, BTreeElement> 반환
    3. bopPositionWithGet (pwg): 주어진 bKey의 position을 찾고, 해당 position 양쪽으로 count 개씩 인접 element를 함께 반환

작업 특이사항

as-is

  • BTreeFindPosition, BTreeFindPositionWithGet은 bKey를 long 또는 byte[] 형태로만 받는 생성자만 존재

to-be

  • v2 레이어의 BKey VO를 기존 legacy 클래스에 연결하기 위해 각각 생성자를 추가
    • BTreeFindPosition: String 생성자 추가 → bopGetPosition에서 bKey.toString() 값을 그대로 전달
    • BTreeFindPositionWithGet: BKeyObject를 받는 생성자 추가 + 기존 long/byte[] 생성자는 이를 위임하도록 체이닝
    • BKey: toBKeyObject() 변환 메서드 추가

@f1v3-dev f1v3-dev requested a review from oliviarla March 25, 2026 08:38
@f1v3-dev f1v3-dev self-assigned this Mar 25, 2026
@f1v3-dev f1v3-dev force-pushed the feat/v2-btree-position branch from bbfc75c to 21ae673 Compare March 25, 2026 08:56
Copy link
Copy Markdown
Collaborator

@oliviarla oliviarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 완료입니다.

@f1v3-dev f1v3-dev force-pushed the feat/v2-btree-position branch 3 times, most recently from f345e0c to aada6a8 Compare March 27, 2026 02:12
@f1v3-dev f1v3-dev requested a review from oliviarla March 27, 2026 02:13
oliviarla
oliviarla previously approved these changes Mar 27, 2026
Copy link
Copy Markdown
Collaborator

@jhpark816 jhpark816 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 완료

@f1v3-dev
Copy link
Copy Markdown
Collaborator Author

의견 정리 및 구현 방향

1. bopGetByPosition (범위 조회)

  • 반환 값: List<BTreeElement>
  • from <= to 조건을 만족해야 함. (e. g 30..10 → 예외 발생)
  • BTreeOrder.ASC or BTreeOrder.DESC 를 활용하도록 제안

2. bopPositionWithGet

  • 반환 값: List<BTreePositionElement> (position + BTreeElement 형태)
  • 요청한 bKey에 대한 index 값은 넘겨주지 않음.
  • 만약 요청한 bKey에 대한 정보가 필요한 경우 유저가 요청한 bKey를 기반으로 별도의 탐색을 진행해야 함.

@jhpark816
Copy link
Copy Markdown
Collaborator

@oliviarla 리뷰가 끝났나요?

@oliviarla
Copy link
Copy Markdown
Collaborator

@f1v3-dev 새로운 반환 타입 구현이 반영된 상태라면, 셀프 리뷰 한번 먼저 해주세요.

@f1v3-dev f1v3-dev force-pushed the feat/v2-btree-position branch 3 times, most recently from 3282764 to c00aae8 Compare April 1, 2026 01:15
@f1v3-dev
Copy link
Copy Markdown
Collaborator Author

f1v3-dev commented Apr 1, 2026

@oliviarla

셀프 리뷰 진행하였습니다. 리뷰 부탁드립니다!

Copy link
Copy Markdown
Collaborator

@oliviarla oliviarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰입니다.

@f1v3-dev f1v3-dev force-pushed the feat/v2-btree-position branch from c00aae8 to 11ef0d9 Compare April 1, 2026 05:29
Copy link
Copy Markdown
Collaborator

@oliviarla oliviarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 완료입니다.

@f1v3-dev f1v3-dev force-pushed the feat/v2-btree-position branch 2 times, most recently from e423acb to 9c37573 Compare April 1, 2026 09:13
@f1v3-dev f1v3-dev force-pushed the feat/v2-btree-position branch from 9c37573 to 266db90 Compare April 2, 2026 05:01
@f1v3-dev f1v3-dev force-pushed the feat/v2-btree-position branch from 266db90 to 1d3310d Compare April 2, 2026 05:01
@f1v3-dev f1v3-dev requested a review from oliviarla April 2, 2026 05:01
@jhpark816 jhpark816 merged commit 227ba3b into naver:develop Apr 2, 2026
2 checks passed
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.

3 participants