Skip to content

Commit aeb12d7

Browse files
committed
fix(ddl): initialize idle_session_timeout_secs in CREATE and CLONE DATABASE handlers
DatabaseDescriptor gained idle_session_timeout_secs in the preceding commit; the CREATE DATABASE, CLONE DATABASE, and MIRROR DATABASE create handlers need to set the field to 0 (disabled) when constructing the initial descriptor so the struct literal compiles without missing fields.
1 parent 8f5be54 commit aeb12d7

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

nodedb/src/control/server/pgwire/ddl/database/clone.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ pub fn handle_clone_database(
170170
}),
171171
mirror_origin: None,
172172
audit_dml: nodedb_types::AuditDmlMode::None,
173+
idle_session_timeout_secs: 0,
173174
};
174175

175176
// ── Propose via Raft ──────────────────────────────────────────────────────

nodedb/src/control/server/pgwire/ddl/database/create.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ pub fn handle_create_database(
108108
parent_clone: None,
109109
mirror_origin: None,
110110
audit_dml: nodedb_types::AuditDmlMode::None,
111+
idle_session_timeout_secs: 0,
111112
};
112113

113114
// Propose through metadata Raft group 0 so all replicas apply the

nodedb/src/control/server/pgwire/ddl/database/mirror/create.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ pub fn handle_mirror_database(
113113
parent_clone: None,
114114
mirror_origin: Some(mirror_origin),
115115
audit_dml: nodedb_types::AuditDmlMode::None,
116+
idle_session_timeout_secs: 0,
116117
};
117118

118119
// Propose through Raft; fall back to direct write in single-node mode.

0 commit comments

Comments
 (0)