[#687] UserTimeZone 동기화 요청을 중복 제한한다#689
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors UserTimeZoneSyncHandler to prevent duplicate timezone synchronization requests by introducing a syncingKeys set and adding .removeDuplicates() to the sign-in observer. However, the review highlights two critical issues: first, .removeDuplicates() on the sign-in publisher will block synchronization when switching users directly without logging out; second, accessing mutable state like syncingKeys and lastSyncedKey across multiple threads without synchronization introduces data race risks, which should be resolved using a lock or serial queue rather than @MainActor isolation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
24e522e to
0f90c88
Compare
🔗 연관된 이슈
🎯 의도
📝 작업 내용
📌 요약
UserTimeZoneSyncHandler의 로그인 상태 중복 방출 필터링 추가(uid, timeZoneIdentifier)조합의 완료/진행 중 중복 저장 방지 처리🔍 상세
didFinishLaunchingWithOptions에서.didRequestUserTimeZoneSync직접 post 제거observeSignedIn()에removeDuplicates()적용SyncKey를Hashable로 변경하고syncingKeys로 진행 중인 같은 key 중복 요청 차단lastSyncedKey와syncingKeys초기화updateUserTimeZone()성공 후에만lastSyncedKey갱신📸 영상 / 이미지 (Optional)