feat: 중복 저장 시 PIN_DUPLICATED 알림 발송 - #117
Open
sudosubin wants to merge 1 commit into
Open
Conversation
|
Warning Review limit reachedNext included review available in 49 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (11)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
2 times, most recently
from
August 30, 2026 15:30
5a4e3e5 to
dc8bdc0
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 30, 2026 15:30
90eca1a to
96c25e6
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 30, 2026 15:42
dc8bdc0 to
d2e314e
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 30, 2026 15:42
96c25e6 to
cdcf3f5
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 30, 2026 15:46
d2e314e to
ce7a265
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 30, 2026 15:46
cdcf3f5 to
0cffb31
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 30, 2026 15:52
ce7a265 to
0fc589f
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
2 times, most recently
from
August 30, 2026 16:00
e5a0c1b to
ecfe648
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 30, 2026 16:00
0fc589f to
8993972
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 30, 2026 16:14
ecfe648 to
6d2b012
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 30, 2026 16:14
8993972 to
36a34b0
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 30, 2026 16:24
6d2b012 to
d444bb7
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
2 times, most recently
from
August 31, 2026 11:49
cc841b2 to
d66d70e
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 31, 2026 11:49
d444bb7 to
5d3a2b5
Compare
sudosubin
marked this pull request as ready for review
August 31, 2026 13:00
sudosubin
requested review from
KKardy,
labyrinth30 and
minsour
as code owners
August 31, 2026 13:00
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 31, 2026 13:28
5d3a2b5 to
283788b
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 31, 2026 13:28
d66d70e to
965caa0
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 31, 2026 14:11
283788b to
95cab62
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
2 times, most recently
from
August 31, 2026 14:17
e002b2f to
c45047d
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
2 times, most recently
from
August 31, 2026 14:27
433a425 to
a198393
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 31, 2026 14:27
c45047d to
047dfc6
Compare
sudosubin
force-pushed
the
feat/fcm-room-join-notifications
branch
from
August 31, 2026 15:28
a198393 to
1df74e5
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
August 31, 2026 15:31
047dfc6 to
700d1ed
Compare
sudosubin
changed the base branch from
feat/fcm-room-join-notifications
to
main
August 31, 2026 15:31
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
September 1, 2026 01:24
700d1ed to
19273a8
Compare
sudosubin
force-pushed
the
feat/fcm-push-payload
branch
from
September 1, 2026 01:31
b69eb6d to
cd1b91d
Compare
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
September 1, 2026 01:31
19273a8 to
0f94dde
Compare
이미 저장돼 있던 장소를 저장한 사람에게 알린다(PRD [SYS-002] Flow B). 방이 몇 개 중복이었든 장소당 한 건이고 대상 이름은 장소명만 싣는다(FR-021). 판정 기준은 task.enqueuedAt이다. sourceId로는 가를 수 없다 — 게시물 URL 하나에 source 행이 하나라 같은 글을 두 번 저장해도 sourceId가 같다. 큐가 최대 10회 재배달하는데, 재배달은 payload를 그대로 다시 받으므로 enqueuedAt이 같아 앞선 시도가 넣은 핀을 중복으로 잘못 잡지 않는다.
sudosubin
force-pushed
the
feat/fcm-pin-duplicated
branch
from
September 1, 2026 01:38
0f94dde to
46b033f
Compare
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.
📌 Related Issue
🚀 Description
이미 저장돼 있던 장소를 다시 저장하면
이미 저장해둔 곳이에요알림을 남깁니다. (PRD [SYS-002] Flow B)방이 몇 개 중복이었든 장소당 한 건이고, 대상 이름에는 장소명만 싣습니다. 어느 방에서 중복이었는지는 알림함이 알리지 않습니다. (FR-021, EC-019)
payload에는{ placeId }만 담아 앱이 장소 상세로 이동하도록 합니다.중복 판정 기준으로
pins.source_id를 쓰려 했는데,ensureActiveInstagramSource가 게시물 URL 하나에 source 행 하나를 재사용해서 같은 글을 두 번 저장해도 sourceId가 같습니다. 그래서 task payload에enqueuedAt을 싣고 그보다 먼저 만들어진 핀만 중복으로 봅니다.이 기준이 필요한 이유는 재배달입니다. 큐는 최대 10회 재시도하고 워커는 핀을 저장한 뒤에도 던질 수 있어서, insert 결과의 차집합으로 판정하면 2회차에 앞선 시도가 넣은 핀이 전부 중복으로 잡힙니다. 재배달은 payload를 그대로 다시 받으므로
enqueuedAt이 같아 이 문제가 없습니다.sequenceDiagram participant CT as Cloud Tasks participant W as PlaceWorkerController participant Repo as PlaceResultRepository participant Notif as NotificationService CT->>W: POST /tasks/pins (task) W->>Repo: save(task, matches) rect rgb(245, 245, 245) Note over Repo: 한 트랜잭션 Repo->>Repo: places upsert Repo->>Repo: 기존 활성 핀 조회 (created_at < enqueuedAt) Note right of Repo: 핀 insert 전에 읽어야 함 Repo->>Repo: pins insert (onConflictDoNothing) end Repo-->>W: duplicatedPlaces W->>Notif: PIN_DUPLICATED (장소당 1건) Note right of Notif: key에 enqueuedAt 포함, 재배달 시 접힘📢 Notes
enqueuedAt은 optional입니다. 배포 시점에 큐에 남아 있던 옛 task는 판정 기준이 없어 중복을 알리지 않습니다.enqueuedAt을 넣어야 같은 글을 다시 저장했을 때 별개 행으로 남습니다. (TS-052)places.images ->> 0으로 읽는데, 현재places.images를 채우는 코드가 없어서 항상 null입니다. images가 채워지면 코드 변경 없이 동작합니다.