[#65] Snowflake ID 적용#66
Open
CEO-Nick wants to merge 18 commits into
Open
Conversation
f-lab-jason
reviewed
Jul 24, 2024
f-lab-jason
left a comment
There was a problem hiding this comment.
서비스 클래스들은 테스트코드 수정없이 잘 되나요? 새 dependency가 추가되었는데 코드는 바뀐게 없어서 질문드립니다.
새로 추가된 코드들도 테스트코드를 추가해주세요. (제가 느끼기엔 SnowflakeIdGenerator 자체가 필요없어보이기는합니다만..)
- nextId() 수정을 통해서 SnowflakeIdGenerator 클래스가 필요없어짐
Collaborator
Author
|
테스트 코드는 snowflake id 전략을 도입한 user, post, notification에서 각 객체 생성할 때 테스트 코드를 수정했고, 모두 통과하는 걸 확인했습니다! 그리고 nextId()로 snowflake id 생성할 때, machine id를 매개변수로 줘서 id를 생성하는 방식으로 코드 수정했습니다! |
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.
DB 샤딩을 위한 Snowflake ID 적용
USER의 id를 제외한 나머지 id 값은 userId를 가지고 snowflake id 생성
db 개수 2개로 설정하고 모듈러 샤딩 적용