-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
Turns out if it's in a once-cell drop doesn't get called if the developer hits ctrl+c which means next time the manager is restarted it won't start again. So we put it back in ProjectDb. Also removed oncecell dependency which means we can simplify feature to just 'pg-embed'.
|
There was also the issue with pipeline stats not getting displayed. |
If we do it anyways we'll potentially overwrite the changes done by the user if they happen in parallel.
We reset the form after a connector is edited/added and switch back to the initial tab. We also update the form with the current connector for edit by using useEffect which guarantees it will re-render with the correct form values.
pipeline stats werent displyaed anymore because endpoint_name semantics has changed.
Disallow backend fetches to override local state that's been modified.
Another PR changed how we named endpoints.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #389 +/- ##
==========================================
- Coverage 73.85% 73.82% -0.03%
==========================================
Files 238 238
Lines 51586 51581 -5
==========================================
- Hits 38097 38081 -16
- Misses 13489 13500 +11
|
Benchmark resultsNexmark
Galen
LDBC
Nexmark (with Persistence)
|
| // lifetime of the program. | ||
| #[cfg(feature = "pg-embed")] | ||
| #[allow(dead_code)] // It has to stay alive until ProjectDB is dropped. | ||
| pg_inst: Option<pg_embed::postgres::PgEmbed>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so I understand, how is this more robust to dropping during kill-9 than a shared reference with OneCell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we press ctrl+c on the manager in the console running as dev, and pg_inst is in a OnceCell, then drop() is not called, and so the Postgres process remains running (pg-embed does not stop it). So if you restart it after, it complains because it can't bring up the postgres instance again (it's still running the stale instance). So you have to manually go and kill postgres which is a bit annoying when working on the manager. If PgEmbed is in the struct then drop() gets called and Postgres is stopped.
with kill-9 this is still a problem even now: the postgres daemon is not cleaned up and we have to do it manually. But hopefully we won't need to kill-9 the process a lot anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that, but what I don't get is:
If OnceCell is dropped the PgEmbed instance should also be dropped right? Same as when we add the PgEmbed instance to the ProjectDB struct? What makes OnceCell not be dropped during sigterm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's a static:
Static items do not call drop at the end of the program.
https://doc.rust-lang.org/reference/items/static-items.html
https://users.rust-lang.org/t/about-drop-call-of-static-object/50544/4
It has been discussed as expected behavior for OnceCell: matklad/once_cell#98
e.g., link suggest to use atexit functionality with other libraries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, missed the part about it being static. Thanks.
If we don't update the query cache the UI will re-create the just deleted from the query cache one savestatus goes to isUptoDate.
Uh oh!
There was an error while loading. Please reload this page.