refactor(managed-agent): fold the last CSI statement helper copies (#16503)

The CSI ready admission and application progress stores kept their own
copies of the 10 second query-timeout statement helper because #16485
was still editing the adjacent lines when #16486 introduced the shared
helper. Both now use the shared one; the timeout is unchanged.

Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
jinyeandClaude Opus 5.5 authored and GitHub committed 2026-11-07 08:51:40 +08:00
1 parent e99286813e
commit da30adcc2e
2 files changed
+4 -12

No files matched your search

@@ -12,6 +12,8 @@ import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.time.Instant;
import static com.alibaba.qwen.code.runtimebroker.persistence.JdbcRepositorySupport.statement;
public final class JdbcCsiApplicationProgress {
private JdbcCsiApplicationProgress() {
}
@@ -128,12 +130,6 @@ public final class JdbcCsiApplicationProgress {
}
}
private static PreparedStatement statement(Connection connection, String sql) throws SQLException {
PreparedStatement statement = connection.prepareStatement(sql);
statement.setQueryTimeout(10);
return statement;
}
private static void require(boolean condition) {
if (!condition) {
throw unavailable();
@@ -7,6 +7,8 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import static com.alibaba.qwen.code.runtimebroker.persistence.JdbcRepositorySupport.statement;
public final class JdbcCsiReadyAdmission {
private JdbcCsiReadyAdmission() {
}
@@ -84,12 +86,6 @@ public final class JdbcCsiReadyAdmission {
}
}
private static PreparedStatement statement(Connection connection, String sql) throws SQLException {
PreparedStatement statement = connection.prepareStatement(sql);
statement.setQueryTimeout(10);
return statement;
}
private static void require(boolean condition) {
if (!condition) {
throw unavailable();