-
Notifications
You must be signed in to change notification settings - Fork 47
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: Create new api asyncBopPipedUpsert. #657
base: develop
Are you sure you want to change the base?
Conversation
b70e141
to
bcab24e
Compare
Assert.assertEquals(elementCount, upsertResult.size()); | ||
int idx = 0; | ||
for (Element<Object> elem : upsertResult.values()) { | ||
Assert.assertEquals(elem.getValue(), "upsertValue" + idx); |
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.
bkey도 맞는지 확인해봅시다.
0, false, false).get(); | ||
Long idx = 0L; | ||
for (Long bKey : resultMap.keySet()) { | ||
Assert.assertEquals(idx, bKey); |
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.
value도 맞는지 확인해봅시다.
0, false, false).get(); | ||
Long idx = 0L; | ||
for (Long bKey : resultMap.keySet()) { | ||
Assert.assertEquals(idx, bKey); |
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.
value 맞는지 확인해봅시다.
.get(); | ||
int idx = 0; | ||
for (Element<Object> elem : resultMap.values()) { | ||
Assert.assertEquals(elem.getValue(), "upsertValue" + idx); |
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.
bkey도 맞는지 확인해봅시다.
.get(); | ||
int idx = 0; | ||
for (Element<Object> elem : resultMap.values()) { | ||
Assert.assertEquals(elem.getValue(), "upsertValue" + idx); |
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.
bkey도 맞는지 확인해봅시다.
bcab24e
to
89077c2
Compare
@uhm0311 @brido4125 |
upsertElem.put(i, "upsertValue" + i); | ||
} | ||
CollectionAttributes attr = new CollectionAttributes(); | ||
mc.asyncBopPipedInsertBulk(KEY, insertElem, attr); |
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.
Future.get() 호출합시다.
} | ||
upsertElem.put(i, "upsertValue" + i); | ||
} | ||
mc.asyncBopPipedInsertBulk(KEY, insertElem, new CollectionAttributes()); |
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.
Future.get() 호출
} | ||
|
||
CollectionAttributes collectionAttributes = new CollectionAttributes(); | ||
mc.asyncMopPipedInsertBulk(KEY, insertElem, collectionAttributes); |
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.
Future.get() 호출
} | ||
|
||
CollectionAttributes collectionAttributes = new CollectionAttributes(); | ||
mc.asyncBopPipedUpsertBulk(KEY, insertElem, collectionAttributes); |
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.
Future.get() 호출
upsertElem.add(new Element<Object>(i, "upsertValue" + i, new byte[]{(byte) 1})); | ||
} | ||
CollectionAttributes attr = new CollectionAttributes(); | ||
mc.asyncBopPipedInsertBulk(KEY, insertElem, attr); |
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.
Future.get() 호출
mc.asyncBopPipedInsertBulk(KEY, insertElem, attr); | ||
|
||
//when | ||
mc.asyncBopPipedUpsertBulk(KEY, upsertElem, attr); |
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.
Future.get() 호출
CollectionAttributes attr = new CollectionAttributes(); | ||
|
||
//when | ||
mc.asyncBopPipedUpsertBulk(KEY, elements, attr); |
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.
Future.get() 호출
CollectionAttributes attr = new CollectionAttributes(); | ||
|
||
//when | ||
mc.asyncBopPipedUpsertBulk(KEY, elements, attr); |
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.
Future.get() 호출
89077c2
to
0bd849c
Compare
@brido4125 |
@brido4125 |
0bd849c
to
368d0ed
Compare
@brido4125 |
1b07c1f
to
1a4ccbb
Compare
int idx = 0; | ||
for (Element<Object> elem : upsertResult.values()) { | ||
Assert.assertEquals(elem.getValue(), "upsertValue" + idx); | ||
Assert.assertEquals(elem.getLongBkey(), idx); |
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.
다른 곳과 일관성 있게 Bkey를 먼저 확인하고 그 다음에 Value를 확인합시다.
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.
반영하였습니다.
1a4ccbb
to
c77a816
Compare
07918e6
to
ae2a82f
Compare
Motivation
아래 캐시 동기화에 필요한 기능 이슈를 해결하기 위해 구현한다.
https://github.com/jam2in/arcus-works/issues/426
구현 로직
캐시 서버는 bop insert와 bop upsert 요청에 대해
아래와 같이 동일한 인자와 형식을 가지고 있습니다.
그래서 기존의 asyncCollectionPipedInsert()를 활용하여
piped upsert를 가능하도록 구현하였습니다.
단건 upsert의 경우도 아래와 같이
asyncCollectionInsert
를사용하여 구현되어 있습니다.
즉, 이러한 구현이 단건과 다건 api에 대한 일관적으로 구현된 형태입니다.