Skip to content
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

Fis/#139 LinkedList 자료구조 개선 #141

Merged
merged 2 commits into from
Aug 29, 2024
Merged

Fis/#139 LinkedList 자료구조 개선 #141

merged 2 commits into from
Aug 29, 2024

Conversation

LuizyHub
Copy link
Member

🚀 작업 내용

  • 아직 더 정밀한 테스트가 필요합니다!!!

📸 이슈 번호

👀 Focus Commits [Optional]

  • 커밋해시: 내용

✍ 궁금한 점

  • 중점적으로 봐줄 내용
  • 변수명 괜찮나요
  • 로직이 좀 더럽나요
  • 가독성이 좀 그런가요?

- 생산자 소비자가 병렬적으로 호출할 수 있는  single linked list 추가
- SingleLinkedList를 활용한 LogQueue 추가
Copy link

Risk Level 2 - /home/runner/work/Team5-Guys/Team5-Guys/logbat/src/main/java/info/logbat/domain/log/queue/LogQueue.java

  1. The use of LockSupport.parkNanos(timeoutNanos); in the consume method may lead to potential thread starvation if not handled properly. Consider using a more robust waiting mechanism, such as Condition or Semaphore, to manage consumer threads more effectively.

  2. The produce method does not handle the case where data is null. Adding a null check can prevent potential NullPointerExceptions:

    if (data == null) return;

Risk Level 2 - /home/runner/work/Team5-Guys/Team5-Guys/logbat/src/main/java/info/logbat/domain/log/queue/SingleLinkLogQueue.java

  1. The consume method uses System.currentTimeMillis() for timeout checks, which may not be precise enough for high-performance applications. Consider using System.nanoTime() for more accurate timing.

  2. The method currently does not handle the case where data is null in the produce method. Adding a null check can prevent potential NullPointerExceptions:

    if (data == null) return;

🔍⚠️🛠️


Powered by Code Review GPT

@LuizyHub LuizyHub requested a review from a team August 29, 2024 02:19
Copy link
Member

@miiiinju1 miiiinju1 left a comment

Choose a reason for hiding this comment

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

마지막까지 수고하셨습니다!!

Copy link
Member

@tidavid1 tidavid1 left a comment

Choose a reason for hiding this comment

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

정합성 고려가 조금 더 필요할 것 같습니다 ㅠㅠ 한번 열심히 리팩토링 해 보아요 👍🏻

@tidavid1 tidavid1 merged commit 10cf89a into dev Aug 29, 2024
1 check passed
@tidavid1 tidavid1 deleted the feat/#139 branch August 29, 2024 02:20
LuizyHub added a commit that referenced this pull request Aug 29, 2024
* feat: single linked list 추가

- 생산자 소비자가 병렬적으로 호출할 수 있는  single linked list 추가

* feat: SingleLinkLogQueue 추가

- SingleLinkedList를 활용한 LogQueue 추가
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