Repository navigation
[article] 조회수 집계 및 인기 문서 API 추가 - #41
Merged
Merged
Conversation
ZaMan0806
force-pushed
the
feat/article-view-count
branch
from
October 12, 2026 02:18
8013995 to
e5f604e
Compare
ZaMan0806
force-pushed
the
feat/article-view-count
branch
from
October 12, 2026 02:23
e5f604e to
b0ce51f
Compare
ZaMan0806
force-pushed
the
feat/article-view-count
branch
2 times, most recently
from
October 12, 2026 03:10
281c631 to
e00fe3b
Compare
ZaMan0806
force-pushed
the
feat/article-view-count
branch
from
October 12, 2026 03:13
e00fe3b to
8dcdc92
Compare
- 문서 조회(GET, 제목 조회 포함) 시 조회수 증가, 같은 조회자의 30분 내 재조회는 집계하지 않음 - 조회수는 Redis에 쌓았다가 주기적으로 articles.view_count에 반영 (벌크 UPDATE라 최근 변경·수정 시각에 영향 없음) - 문서 조회 응답에 viewCount 포함, GET /api/v1/articles/popular 추가 - Redis 집계 장애가 문서 조회를 막지 않도록 실패 시 기존 응답 유지 Closes #26
- 플러시가 pending을 processing으로 옮긴 뒤 MySQL에 반영하기 전에 누적값을 다시 채우면 그 증가분이 빠져 낮게 시드되던 문제 수정
ZaMan0806
force-pushed
the
feat/article-view-count
branch
from
October 12, 2026 03:26
8dcdc92 to
e68d61d
Compare
snowykte0426
previously approved these changes
Oct 13, 2026
snowykte0426
approved these changes
Oct 13, 2026
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.
Summary
Closes #26
Changes
GET /articles/{id},/by-title) 시 조회수 증가, 응답viewCount에 누적 값 포함. 공동편집 부트스트랩 등 내부 조회는 세지 않음article.views.dedupe-minutes). 비로그인 조회마다 세션을 만들지 않음articles.view_count에 반영. 읽기 경로가 MySQL을 보지 않도록 누적값도 Redis에 둠updatedAt(최근 변경 목록)에 영향이 없고, 엔티티는view_count를 쓰지 않아(updatable=false) 문서 수정이 오래된 값으로 덮어쓰지 않음GET /api/v1/articles/popular?size=— 전체 기간 조회수 순Test
./mill test,./mill spotless --check통과@DataJpaTest주의
리버스 프록시 뒤에서는
server.forward-headers-strategy로 실제 클라이언트 주소가 전달돼야 비로그인 조회자가 구분됩니다. 반영 직후·삭제 전에 프로세스가 죽으면 한 주기 분량이 한 번 더 반영될 수 있습니다(유실보다 낫다고 판단).Checklist
Stack created with GitHub Stacks CLI • Give Feedback 💬