Commit dabe6b8
fix(controlplane): default passthrough sessions into the tenant catalog
On the remote-worker (MTCP) path, passthrough sessions skipped the entire
session-init block, leaving the worker's DuckDB connection in its empty
in-memory catalog. As a result `current_database()` returned `memory` and
any unqualified DDL/DML executed against the ephemeral in-memory catalog
instead of the tenant's DuckLake warehouse — verified live (6/6 fresh
passthrough connections reported `current_database()=memory`).
Standalone passthrough already lands in the right place via
server.setDuckLakeDefault / setIcebergDefault in CreatePassthroughDBConnection;
the remote-worker path had no equivalent. Add a passthrough branch that detects
the attached `ducklake` catalog and issues the matching `USE` (preferring an
iceberg-default user's configured catalog), so passthrough sessions default
into the tenant catalog just like standalone and non-passthrough sessions.
This does NOT enable logical-catalog mapping for passthrough: those sessions
still talk raw DuckDB against the physical catalog name (`ducklake`), so
SetLogicalCatalogMapping stays disabled for them.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent b774ce6 commit dabe6b8
3 files changed
Lines changed: 75 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1132 | 1135 | | |
1133 | 1136 | | |
1134 | 1137 | | |
| |||
1170 | 1173 | | |
1171 | 1174 | | |
1172 | 1175 | | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1173 | 1201 | | |
1174 | 1202 | | |
1175 | 1203 | | |
| |||
1183 | 1211 | | |
1184 | 1212 | | |
1185 | 1213 | | |
1186 | | - | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
1187 | 1219 | | |
1188 | 1220 | | |
1189 | 1221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
28 | 46 | | |
29 | 47 | | |
30 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments