Skip to content

FEATURE: Add CompletableFuture append/prepend API#1054

Open
f1v3-dev wants to merge 1 commit intonaver:developfrom
f1v3-dev:feat/v2-append-prepend
Open

FEATURE: Add CompletableFuture append/prepend API#1054
f1v3-dev wants to merge 1 commit intonaver:developfrom
f1v3-dev:feat/v2-append-prepend

Conversation

@f1v3-dev
Copy link
Collaborator

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

🔗 Related Issue

⌨️ What I did

  • append, prepend API 구현을 진행했습니다.

구현 특이사항

  • append / prepend는 서버 측에서 raw byte 단위로 값을 이어 붙이는 연산입니다.
  • 서버는 저장된 값의 타입과 관계없이 단순히 기존 바이트 뒤 또는 앞에 새 바이트를 연결합니다.
  • 따라서, String 또는 byte[] 타입의 값에 대해서만 정상 동작하며, 다른 타입에 사용할 경우 문제가 발생합니다.

문제 상황 예시

  • 서버는 바이트 연결 자체는 성공하기 때문에 SUCCESS 를 반환합니다.
  • 클라이언트 또한 연결 자체는 정상 처리로 인식합니다.
  • 하지만, 이후 get(key) 명령을 처리할 때 flag에 기록된 타입 정보와 실제 바이트 구조가 불일치하여 Exception 또는 이상한 값이 발환됩니다.

예시 케이스

기존 값 연산 append 결과 get(key) 결과
"Hello, " (String) append(key, "Arcus!") 성공(SUCCESS) "Hello, Arcus!" (정상 처리)
1 (Integer) append(key, 2) 성공(SUCCESS) 235 (잘못된 값)
"Hello" (String) append(key, 123) 성공(SUCCESS) "Hello " (공백문자 삽입)

@f1v3-dev f1v3-dev requested a review from oliviarla March 6, 2026 09:28
@f1v3-dev f1v3-dev self-assigned this Mar 6, 2026
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.

1 participant