[Developer] #567 list latest SQL cursors without time cutoff

This commit is contained in:
devmrko
2026-07-01 15:14:27 +09:00
parent b39968d43f
commit 57d77d2df2
3 changed files with 5 additions and 6 deletions

View File

@@ -46,7 +46,6 @@ public class OrdsProbeService {
private static final TypeReference<Map<String, Object>> MAP_TYPE = new TypeReference<>() {
};
private static final Logger log = LoggerFactory.getLogger(OrdsProbeService.class);
private static final int EXECUTION_EVIDENCE_LOOKBACK_MINUTES = 15;
private record ExecutionEvidenceLookup(
SqlExecutionEvidence evidence,
@@ -277,7 +276,7 @@ public class OrdsProbeService {
lookup.candidates());
}
return result.withExecutionEvidence(null,
"근 15분의 최신 실행 cursor 10건에서 이 보호 대상을 찾지 못했습니다. "
"최신 실행 cursor 10건에서 이 보호 대상을 찾지 못했습니다. "
+ "아래 원문 SQL을 직접 확인하세요.",
lookup.candidates());
}
@@ -339,7 +338,7 @@ public class OrdsProbeService {
elapsed_time,
buffer_gets
FROM v$sql
WHERE last_active_time >= SYSTIMESTAMP - NUMTODSINTERVAL(?, 'MINUTE')
WHERE last_active_time IS NOT NULL
ORDER BY last_active_time DESC
)
WHERE ROWNUM <= 10
@@ -354,7 +353,7 @@ public class OrdsProbeService {
resultSet.getLong("rows_processed"),
Math.round(resultSet.getLong("elapsed_time") / 1000.0d),
resultSet.getLong("buffer_gets")
), EXECUTION_EVIDENCE_LOOKBACK_MINUTES);
));
List<SqlExecutionCandidate> candidateViews = candidates.stream()
.map(candidate -> new SqlExecutionCandidate(