Skip to content

Commit

Permalink
ui: delay sql module registration until after potential reset
Browse files Browse the repository at this point in the history
Fixes loading SQL modules when resetting the state of trace
processor (e.g. loading trace from local storage on an already
created instance of TP)

Change-Id: I3f106f7d164e13c75edff8153c3cdb2965b17a48
  • Loading branch information
LalitMaganti committed Aug 23, 2024
1 parent 6441ab9 commit feb0263
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/controller/trace_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,6 @@ export class TraceController extends Controller<States> {
ftraceDropUntilAllCpusValid: FTRACE_DROP_UNTIL_FLAG.get(),
});
}
for (const p of globals.extraSqlPackages) {
await engine.registerSqlModules(p);
}
this.engine = engine;

if (isMetatracingEnabled()) {
Expand Down Expand Up @@ -491,6 +488,9 @@ export class TraceController extends Controller<States> {
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();
Expand Down

0 comments on commit feb0263

Please sign in to comment.