-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Describe the bug
User reports
[In the VSCE], after saving a model file, the extension will occasionally hang in the
While analyzing, live error detection is paused state
, thereby rendering the extension unusable.
I've attached a screenshot of my dbt LSP output from the latest time this bug has occurred. The issue appears to be the following:thread 'tokio-runtime-worker' panicked at crates\dbt-db\src\db.rs:227:13: expected schema by fqn note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@TIHan, we don't yet have a repro for this, perhaps you can sketch out a scenario where this might be thrown so I can better narrow things down with the user? Below is as far as I was able to get looking at the code.
as I spelunk this error message introduced in https://github.com/dbt-labs/fs/pull/5370, crates\dbt-db\src\db.rs:227:13
points to the below error message within the remove_table_schema()
function. remove_table_schema()
is invoked inside of with_invalidated_unique_ids()
as part of deep cloning the db?
let Some(_) = self.schemas_by_fqn.remove(&fqn) else {
// Sanity check for invariants
panic!("expected schema by fqn");
};