diff --git a/ui/src/controller/trace_controller.ts b/ui/src/controller/trace_controller.ts index 378d731f6f..95b7bc5163 100644 --- a/ui/src/controller/trace_controller.ts +++ b/ui/src/controller/trace_controller.ts @@ -430,9 +430,6 @@ export class TraceController extends Controller { ftraceDropUntilAllCpusValid: FTRACE_DROP_UNTIL_FLAG.get(), }); } - for (const p of globals.extraSqlPackages) { - await engine.registerSqlModules(p); - } this.engine = engine; if (isMetatracingEnabled()) { @@ -491,6 +488,9 @@ export class TraceController extends Controller { assertTrue(this.engine instanceof HttpRpcEngine); await this.engine.restoreInitialTables(); } + for (const p of globals.extraSqlPackages) { + await this.engine.registerSqlModules(p); + } // traceUuid will be '' if the trace is not cacheable (URL or RPC). const traceUuid = await this.cacheCurrentTrace();