-
Notifications
You must be signed in to change notification settings - Fork 16
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
FEATURE: Add a mop upsert command #292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arcus-c-client/libmemcached/collection.cc
Line 1046 in 3151b64
static memcached_return_t internal_coll_piped_insert(memcached_st *ptr, |
pipe 관련 구현도 변경해야 하지 않나요?
확인 결과 서버에서 제공하는 모든 pipe 기능에 대하여 클라이언트에서 지원하고 있지 않습니다. 이에 대한 기능 지원은 추후에 별도 PR로 올리겠습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 완료
@@ -1334,7 +1337,8 @@ static memcached_return_t do_coll_insert(memcached_st *ptr, | |||
if (attributes) | |||
{ | |||
bool set_overflowaction= verb != SOP_INSERT_OP && | |||
verb != MOP_INSERT_OP | |||
verb != MOP_INSERT_OP && | |||
verb != MOP_UPSERT_OP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아래 위치에 다음과 같은 코드가 있습니다.
MOP_UPSERT_OP인 경우도 동일하게 처리해야 하는 지를 검토 바랍니다.
else if (rc == MEMCACHED_REPLACED && verb == BOP_UPSERT_OP)
{
/* bop upsert returns REPLACED if the same bkey element is replaced. */
rc= MEMCACHED_SUCCESS;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOCS 확인 결과, 아래와 같습니다.
MEMCACHED_SUCCESS
- MEMCACHED_STORED: 기존에 존재하던 B+tree에 element가 삽입됨.
- MEMCACHED_CREATED_STORED: B+tree가 새롭게 생성되고 element가 삽입됨.
- MEMCACHED_REPLACED: 기존에 존재하던 B+tree에서 동일한 bkey를 가진 element를 대체함.
MEMCACHED_REPLACED
또한 MEMCACHED_SUCCESS로 반환하게끔 되어있습니다.
mop upsert 또한 일치시키겠습니다.
eb3a3cd
to
8a99e3c
Compare
|
수정되었습니다. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 완료
@@ -11,6 +11,7 @@ Map item에 대해 수행 가능한 기본 연산들은 아래와 같다. | |||
|
|||
- [Map Item 생성](06-map-API.md#map-item-생성) (Map Item 삭제는 key-value item 삭제 함수로 수행한다) | |||
- [Map Element 삽입](06-map-API.md#map-element-삽입) | |||
- [Map Element Upsert](06-map-API.md#map-element-upsert) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기만 영문 사용하는 것이 일관성이 없습니다.
java client 쪽과 논의하여 맞추도록 하세요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
java client도 bop의 upsert 만 영문으로 사용되고 있습니다. 영어단어를 그대로 사용해도 괜찮을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bop upsert가 그렇다면, mop upsert도 동일하게 합시다.
@namsic 최종 리뷰 진행 바랍니다. |
🔗 Related Issue
⌨️ What I did