FEATURE: Create new api asyncBopPipedUpsert.#657
Open
brido4125 wants to merge 1 commit intonaver:developfrom
Open
FEATURE: Create new api asyncBopPipedUpsert.#657brido4125 wants to merge 1 commit intonaver:developfrom
brido4125 wants to merge 1 commit intonaver:developfrom
Conversation
b70e141 to
bcab24e
Compare
uhm0311
reviewed
Aug 22, 2023
| Assert.assertEquals(elementCount, upsertResult.size()); | ||
| int idx = 0; | ||
| for (Element<Object> elem : upsertResult.values()) { | ||
| Assert.assertEquals(elem.getValue(), "upsertValue" + idx); |
uhm0311
reviewed
Aug 22, 2023
| 0, false, false).get(); | ||
| Long idx = 0L; | ||
| for (Long bKey : resultMap.keySet()) { | ||
| Assert.assertEquals(idx, bKey); |
uhm0311
reviewed
Aug 22, 2023
| 0, false, false).get(); | ||
| Long idx = 0L; | ||
| for (Long bKey : resultMap.keySet()) { | ||
| Assert.assertEquals(idx, bKey); |
uhm0311
reviewed
Aug 22, 2023
| .get(); | ||
| int idx = 0; | ||
| for (Element<Object> elem : resultMap.values()) { | ||
| Assert.assertEquals(elem.getValue(), "upsertValue" + idx); |
uhm0311
reviewed
Aug 22, 2023
| .get(); | ||
| int idx = 0; | ||
| for (Element<Object> elem : resultMap.values()) { | ||
| Assert.assertEquals(elem.getValue(), "upsertValue" + idx); |
bcab24e to
89077c2
Compare
Collaborator
|
@uhm0311 @brido4125 |
uhm0311
reviewed
Aug 24, 2023
| upsertElem.put(i, "upsertValue" + i); | ||
| } | ||
| CollectionAttributes attr = new CollectionAttributes(); | ||
| mc.asyncBopPipedInsertBulk(KEY, insertElem, attr); |
uhm0311
reviewed
Aug 24, 2023
| } | ||
| upsertElem.put(i, "upsertValue" + i); | ||
| } | ||
| mc.asyncBopPipedInsertBulk(KEY, insertElem, new CollectionAttributes()); |
uhm0311
reviewed
Aug 24, 2023
| } | ||
|
|
||
| CollectionAttributes collectionAttributes = new CollectionAttributes(); | ||
| mc.asyncMopPipedInsertBulk(KEY, insertElem, collectionAttributes); |
uhm0311
reviewed
Aug 24, 2023
| } | ||
|
|
||
| CollectionAttributes collectionAttributes = new CollectionAttributes(); | ||
| mc.asyncBopPipedUpsertBulk(KEY, insertElem, collectionAttributes); |
| upsertElem.add(new Element<Object>(i, "upsertValue" + i, new byte[]{(byte) 1})); | ||
| } | ||
| CollectionAttributes attr = new CollectionAttributes(); | ||
| mc.asyncBopPipedInsertBulk(KEY, insertElem, attr); |
| mc.asyncBopPipedInsertBulk(KEY, insertElem, attr); | ||
|
|
||
| //when | ||
| mc.asyncBopPipedUpsertBulk(KEY, upsertElem, attr); |
| CollectionAttributes attr = new CollectionAttributes(); | ||
|
|
||
| //when | ||
| mc.asyncBopPipedUpsertBulk(KEY, elements, attr); |
| CollectionAttributes attr = new CollectionAttributes(); | ||
|
|
||
| //when | ||
| mc.asyncBopPipedUpsertBulk(KEY, elements, attr); |
89077c2 to
0bd849c
Compare
Contributor
|
@brido4125 |
Collaborator
|
@brido4125 |
0bd849c to
368d0ed
Compare
Collaborator
|
@brido4125 |
1b07c1f to
1a4ccbb
Compare
uhm0311
reviewed
Oct 10, 2023
| int idx = 0; | ||
| for (Element<Object> elem : upsertResult.values()) { | ||
| Assert.assertEquals(elem.getValue(), "upsertValue" + idx); | ||
| Assert.assertEquals(elem.getLongBkey(), idx); |
Collaborator
There was a problem hiding this comment.
다른 곳과 일관성 있게 Bkey를 먼저 확인하고 그 다음에 Value를 확인합시다.
1a4ccbb to
c77a816
Compare
uhm0311
approved these changes
Oct 10, 2023
07918e6 to
ae2a82f
Compare
Collaborator
|
@brido4125 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
아래 캐시 동기화에 필요한 기능 이슈를 해결하기 위해 구현한다.
https://github.com/jam2in/arcus-works/issues/426
구현 로직
캐시 서버는 bop insert와 bop upsert 요청에 대해
아래와 같이 동일한 인자와 형식을 가지고 있습니다.
그래서 기존의 asyncCollectionPipedInsert()를 활용하여
piped upsert를 가능하도록 구현하였습니다.
단건 upsert의 경우도 아래와 같이
asyncCollectionInsert를사용하여 구현되어 있습니다.
즉, 이러한 구현이 단건과 다건 api에 대한 일관적으로 구현된 형태입니다.