[Developer] #567 list latest SQL cursors without time cutoff
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<div class="section-heading compact-heading">
|
||||
<div>
|
||||
<h3>DB 실행 증적</h3>
|
||||
<p class="section-subtitle">최근 15분의 최신 DB cursor 10건에서 같은 보호 대상을 찾아 SQL_ID로 확인한 결과입니다.</p>
|
||||
<p class="section-subtitle">DB가 보관한 최신 cursor 10건에서 같은 보호 대상을 찾아 SQL_ID로 확인한 결과입니다.</p>
|
||||
</div>
|
||||
<span class="badge text-bg-success" th:text="${'SQL_ID ' + result.executionEvidence().sqlId()}">SQL_ID</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user