You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkselpl2
changed the title
[Fix] 실시간 리스트/실시간 변수 동기화 race condition 및 값 손실 버그 수정
실시간 리스트/실시간 변수 동기화 race condition 및 값 손실 버그 수정-label:bug
Apr 7, 2026
pkselpl2
changed the title
실시간 리스트/실시간 변수 동기화 race condition 및 값 손실 버그 수정-label:bug
실시간 리스트/실시간 변수 동기화 race condition 및 값 손실 버그 수정 -label:bug
Apr 7, 2026
pkselpl2
changed the title
실시간 리스트/실시간 변수 동기화 race condition 및 값 손실 버그 수정 -label:bug
실시간 리스트/실시간 변수 동기화 race condition 및 값 손실 버그 수정 label:bug
Apr 7, 2026
실시간 리스트에서 값이 undefined로 변하거나 중복/소실되는 race condition을 해결하려는 PR입니다. 핵심 수정은 _queueRealTimeUpdate + _flushRealTimeUpdates 배치 큐 도입인데, 실제 버그 수정 코드는 ~40줄 정도인데 파일 전체(3,900줄)를 재작성해서 리뷰와 역추적이 매우 어렵게 되어있습니다.
심각한 문제 (Merge 전 반드시 수정 필요)
1. common.js 문법 오류 — 쉼표 누락
// PR 코드 (빌드 깨짐)path.resolve(__dirname'dist')// 올바른 코드path.resolve(__dirname,'dist')
2. 파일 전체 재작성 — 코드 소실 위험
기존 메서드들을 삭제하고 주석으로 대체한 부분이 있습니다:
// ... (createDom 나머지 부분은 기존 코드와 동일하게 유지) ...// ... generateAddButtons, createSelectButton, selectFilter 등은 기존 코드 그대로 유지 ...// ... renderMessageReference, renderVariableReference 등 기존 메서드들은 그대로 유지 ...
이 부분들이 실제 코드에서 빠졌다면 런타임에 메서드가 없어서 크래시가 날 수 있습니다. 전체 복사를 했다고 해도, diff에서 보이는 코드 순서 재배치로 인해 어떤 코드가 실제로 빠졌는지 검증이 불가능합니다.
오래된 브라우저에서 structuredClone이 없을 때 ReferenceError가 발생할 수 있습니다.
4. Flush 시점의 데이터 손실 가능성
async_flushRealTimeUpdates(){constupdates=Array.from(this._realTimeUpdateQueue.values());this._realTimeUpdateQueue.clear();// ← 여기서 즉시 비움for(constitemofupdates){// await 동안 새 업데이트가 큐에 들어와도// 이미 clear된 상태라 다음 flush에서 처리되긴 하지만,// await 중 에러 나면 나머지 업데이트도 건너뜀}}
for...of 루프 중 에러가 throw되면 (try/catch가 있긴 하지만) 구조적으로 취약합니다. Promise.allSettled 사용을 권장합니다.
중요 문제
5. lint.js 들여쓰기 깨짐
// PR 코드 — output 블록 인덴트가 1레벨 밀려있음output: {path: path.resolve(__dirname,'dist'),publicPath: '/dist/',filename: '[name].js',clean: false,},
여전히 말씀드린 모든 문제가 해결 되지 않았습니다.
대표적으로 1, 2번 문제로 config의 잘못된 문법 설정과
파일 변경 사항이 너무 많이 보이게 된다는 점
사라진 코드가 존재한다는 점입니다.
한가지 자세한 예로
// 기존 코드 그대로 유지
// ...
라고 주석을 달아도 기존 코드가 유지 되지 않습니다.
추측으로는 ai가 해당 부분은 중복으로 인해 생략을 한것 같은데,
이런 코드를 merge하게 될 경우 서비스에 문제가 생깁니다.
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
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.
관련 이슈
Closes # (3065)
수정 내용
실시간 리스트 버그 수정
실시간 리스트(
isRealTime_모드) 사용 시 발생하는 주요 문제를 해결했습니다.주요 증상이었던 문제:
undefined로 변함수정한 내용 (
src/class/variable_container.js):_realTimeUpdateQueue) 도입structuredClone우선, fallback으로 JSON 사용)_queueRealTimeUpdate()와_flushRealTimeUpdates()메서드 신규 추가updateListSettingView()에서 실시간 리스트일 때 큐를 사용하도록 변경updateList()에서 강제 flush 추가하여 저장/불러오기 시 안정성 강화수정 코드 요약
이 코드는 래거시 코드라 대부분이 고쳐질거 같아요
Entry,Naver 화이팅!!!!!!!!!!!!