-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple show jobs
from CreateMviewProgressTracker
#19189
Comments
Implementation-wise, we need to consider querying permissions for the internal table. |
This also has the added benefit where we can display finished jobs. |
I've taken a look at implementing this. It can't really be implemented as a system catalog. This is because the backfill internal state tables are dynamically queried. We can't statically construct a query to read from all backfilling tables. We can't query them via the meta node, nor can we query them via our batch interface (if it is constructed as a system catalog). Instead, here's my idea:
We can also improve UX further, by introducing new syntax: Shortcomings:
|
Theoretically we can add a table function like
Then what will be it look like? Still querying the meta service for basic information? |
Oh I like the table function idea. I think it might be possible. Inside the binder we can query the catalog and resolve the table function to the actual backfill tables. We can then add a separate system catalog which queries meta for basic info (specifically the hummock table stats). Then we add another SQL view system catalog to query and join both of these. In that way we don't need a special syntax. |
I managed to make pretty good headway with this approach on the frontend side. I bound the table function and use an optimizer rule to rewrite it inside the optimizer, where we can construct the actual plan for it. However, seems like the creating table catalog returned from the meta service is malformed. The reason is that We need to update the table catalog back to FE, only after the catalog has this
|
Continue working on this after #17501 |
We can decouple rw_ddl_progress from meta’s materialized view progress tracker, and maintain it adhoc:
a. Query all the internal backfill state tables for an MV to fetch row_count and finished status.
b. Query internal tables of the MV.
c. Regex the name for backfill tables.
This will:
Simplify logic of materialized view progress tracker. We no longer need to maintain state for counts.
Allow us to track the backfill progress of created sink jobs.
In general, I think the same pattern can be applied to other forms of backfilling, snapshot backfill and shared source backfill.
The text was updated successfully, but these errors were encountered: