Skip to content

Comments

INTERNAL: add option to disable optimization in CollectionTranscoder#877

Merged
jhpark816 merged 1 commit intonaver:developfrom
oliviarla:tc
Feb 19, 2025
Merged

INTERNAL: add option to disable optimization in CollectionTranscoder#877
jhpark816 merged 1 commit intonaver:developfrom
oliviarla:tc

Conversation

@oliviarla
Copy link
Collaborator

@oliviarla oliviarla commented Feb 18, 2025

🔗 Related Issue

⌨️ What I did

  • CollectionTranscoder에 optimize 옵션을 추가하여, 기본적으로는 기존대로 동작하도록 하고 disableOptimize를 사용하여 Transcoder를 생성해야만 위 이슈를 해결할 수 있도록 하였습니다.
  • 빌더 패턴을 추가하여 생성자 종류가 많아지는 것을 줄였습니다.
  • 문서의 경우 현재 ConnectionFactoryBuilder 인자들에 대한 설명이 담긴 문서가 없어 해당 문서 추가할 때 이에 대한 설명도 추가하도록 하겠습니다.

uhm0311
uhm0311 previously approved these changes Feb 18, 2025
Copy link
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.

리뷰 완료

@Override
public CachedData encode(Object o) {
if (!optimize) {
return new CachedData(SERIALIZED, serialize(o), getMaxSize());
Copy link
Collaborator

Choose a reason for hiding this comment

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

플래그를 설정해 두는 것이 좋을 것 같습니다.

flags |= SERIALIZED;

decode 할 시에는
optimize 설정 값이 아닌
flags 값에 따라서 deserialize() 수행하는 것이 맞을 것 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정했습니다.

@jhpark816 jhpark816 merged commit e76e734 into naver:develop Feb 19, 2025
2 checks passed
@oliviarla oliviarla deleted the tc branch April 29, 2025 08:37
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