Merge pull request 'release: 2026-03-02.3 (109건 커밋)' (#92) from develop into main
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 3m42s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 3m42s
This commit is contained in:
커밋
2434b3ddb2
@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2026-03-02.3]
|
||||||
|
|
||||||
|
### 수정
|
||||||
|
- cancelQuery idempotent 처리 — 완료된 쿼리 취소 시 에러 대신 정상 응답
|
||||||
|
- parseTimestamp 실패 로깅 추가, isNightTimeContact 야간 판정 로직 단순화
|
||||||
|
|
||||||
## [2026-03-02.2]
|
## [2026-03-02.2]
|
||||||
|
|
||||||
### 변경
|
### 변경
|
||||||
|
|||||||
@ -438,6 +438,7 @@ public class AreaSearchService {
|
|||||||
try {
|
try {
|
||||||
return Long.parseLong(timestamps.get(index));
|
return Long.parseLong(timestamps.get(index));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
log.warn("Invalid timestamp at index {}: {}", index, timestamps.get(index));
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -360,27 +360,15 @@ public class VesselContactService {
|
|||||||
* 접촉 구간이 22:00~06:00 KST에 포함되는지 판단.
|
* 접촉 구간이 22:00~06:00 KST에 포함되는지 판단.
|
||||||
*/
|
*/
|
||||||
private boolean isNightTimeContact(long contactStartSec, long contactEndSec) {
|
private boolean isNightTimeContact(long contactStartSec, long contactEndSec) {
|
||||||
Instant startInstant = Instant.ofEpochSecond(contactStartSec);
|
ZonedDateTime startKst = Instant.ofEpochSecond(contactStartSec).atZone(KST);
|
||||||
Instant endInstant = Instant.ofEpochSecond(contactEndSec);
|
ZonedDateTime endKst = Instant.ofEpochSecond(contactEndSec).atZone(KST);
|
||||||
|
|
||||||
ZonedDateTime startKst = startInstant.atZone(KST);
|
// 각 날짜의 야간 구간(22:00~익일 06:00)과 접촉 구간 겹침 체크
|
||||||
ZonedDateTime endKst = endInstant.atZone(KST);
|
|
||||||
|
|
||||||
// 접촉 구간 내 모든 날짜에 대해 야간 시간대 겹침 체크
|
|
||||||
LocalDate day = startKst.toLocalDate();
|
LocalDate day = startKst.toLocalDate();
|
||||||
LocalDate lastDay = endKst.toLocalDate().plusDays(1);
|
while (!day.isAfter(endKst.toLocalDate())) {
|
||||||
|
ZonedDateTime nightStart = day.atTime(22, 0).atZone(KST);
|
||||||
while (!day.isAfter(lastDay)) {
|
ZonedDateTime nightEnd = day.plusDays(1).atTime(6, 0).atZone(KST);
|
||||||
// 해당 날짜의 야간: 전날 22:00 ~ 당일 06:00
|
if (startKst.isBefore(nightEnd) && endKst.isAfter(nightStart)) {
|
||||||
ZonedDateTime nightStart = day.atTime(LocalTime.of(22, 0)).atZone(KST).minusDays(1);
|
|
||||||
ZonedDateTime nightEnd = day.atTime(LocalTime.of(6, 0)).atZone(KST);
|
|
||||||
|
|
||||||
// 당일 22:00 ~ 다음날 06:00
|
|
||||||
ZonedDateTime nightStart2 = day.atTime(LocalTime.of(22, 0)).atZone(KST);
|
|
||||||
ZonedDateTime nightEnd2 = day.plusDays(1).atTime(LocalTime.of(6, 0)).atZone(KST);
|
|
||||||
|
|
||||||
if (isOverlapping(startKst, endKst, nightStart, nightEnd)
|
|
||||||
|| isOverlapping(startKst, endKst, nightStart2, nightEnd2)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
day = day.plusDays(1);
|
day = day.plusDays(1);
|
||||||
@ -388,11 +376,6 @@ public class VesselContactService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOverlapping(ZonedDateTime s1, ZonedDateTime e1,
|
|
||||||
ZonedDateTime s2, ZonedDateTime e2) {
|
|
||||||
return s1.isBefore(e2) && s2.isBefore(e1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ── 추정 속도 계산 ──
|
// ── 추정 속도 계산 ──
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -113,10 +113,9 @@ public class StompTrackController {
|
|||||||
trackStreamingService.cancelQuery(queryId);
|
trackStreamingService.cancelQuery(queryId);
|
||||||
chunkedTrackStreamingService.cancelQuery(queryId);
|
chunkedTrackStreamingService.cancelQuery(queryId);
|
||||||
activeSessions.remove(sessionId);
|
activeSessions.remove(sessionId);
|
||||||
return QueryResponse.cancelled(queryId);
|
|
||||||
}
|
}
|
||||||
|
// 세션 없어도 취소 성공 반환 (idempotent — 이미 완료/취소된 쿼리)
|
||||||
return QueryResponse.error(queryId, "Query not found");
|
return QueryResponse.cancelled(queryId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user