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
All tables in mysql databases are marked as non-active and cannot browse them or use table metadata #38509
Comments
Do you know if those tables are somewhat different to the others? |
No, these databases are the same working as expected until the last version abovementioned. If I downgrade de version of metabase to the previous, then I trigger manually metadata fetch and it works. However I cannot downgrade because theare other issues that the new version corrects and I want to keep the latest but obviosly without the current issue. |
When you say a previous version, you refer to 47? |
If Im' not mistaken, with v.0.48.3 it worked as expected. When I detected this issue, I quickly revert the version to the previous one v.0.48.3 and when I triggered the metadata fetch it worked as expected I guess. I might test this in a preprod env when I get a chance and isolate the connections to only one db and test with different versions of metabase and capture logs |
Are the inactive tables in different schemas? can you give me some characteristics? |
In mysql connections, the "schemas" are databases within a server. so in server XXXX I have the database db_abc which with 100 tables in it and metabase now cannot read these 100 tables correctly and all of them are flagged as inactive. The expected behavior is to check which tables do still exist and compare with the already fetched active and then flag inactiv only those that don't match between metabase and the database but the real thing with the issue is that 100% of tables within the mysql database are flagged as inactive. |
@jcorrea-tkww sorry, I didn't get that, please explain with more detail |
got it, can you run SHOW TABLES? as the metabase user? |
It would be very useful to have the server logs emitted during the faulty sync |
Yes, using the same credentials that we use in metabase connection, the SHOW TABLES command returns all the tables as expected |
It would also be very useful to see the output of |
|
@jcorrea-tkww Thanks for the grant details, it's allowed us to rule out one cause. Unfortunately I don't have any other theories yet, so if you could provide the logs from the next time the database gets synced that would be immensely helpful. When you manually sync, does the UI show it completing? |
No, neither manual or scheduled metadata sync works. |
Preliminar analysis after creating a brand new instance of metabase with only the sample database and created a new one to the affected mysql server. So, using v0.48.4 or higher it doesnt work Then shutdown the instance and swtich to use 0.48.3. I create the same connection to the same db and this time everything works as expected. The table METABASE_TABLE is quickly including all the tables in the schema and in the backend (admin->metadata) I can see the tables and columns as well. So. my initital thought is that 0.48.4 introduced something in the mariadb or mysql driver or in the metadata fetch process. I'm now going to export logs for the non-working instance but I cannot expose these logs here, so let me know how can I send them to you a bit anonymized |
@jcorrea-tkww can you give us the permissions of the user and also the names of the schemas? |
the schema name is, for instance "Bodas" or "Bodas_AR" the permissions I already posted above. |
You can send the logs to help@metabase.com |
Logs sent by email |
Cheers, found them and will be investigating this morning. |
Good news - I think I have identified the issue, and it should be fixed by I'll leave this issue open for you to confirm once that version is released. |
great news, looking forward to testing that out! I have just tested the 0.48.6 and it seems that the issue is still there. Maybe that release didn't capture the changes. |
The issue I spotted was definitely fixed by the release, there must be something else at play unfortunately. In the logs you sent me, I believed the tables had already been deactivated by a previous sync for the logs you sent me for 48.4 - I did not see it emit any logs around "retiring" the tables. Can you confirm if that was the case? In either event, getting logs for the sync with 48.6 against a db where the tables are currently active would be very helpful. |
I can confirm this is fixed by 48.6 |
Very glad to hear that! |
Issue
With the newest version v.0.48.4 the metadata sync that we have scheduled to run every day at midnight is marking all of the tables in mysql databases (specific engines only) as non-active causing users cannot explore (browse data) and cannot fetch table metadata in Admin section or use table fields for field filters, etc.
We have different mysql databases, some are not affected, like the Metabase database itself or other ones running 5.x or 8.x versions
However those that are affected are running "Server version: 8.0.26-16 Percona Server (GPL), Release 16, Revision 3d64165"
We tried to trigger the table metadata fetch manually and the results are the same.
We tried to update the table metabase_table and set active = 1 to all of the tables listed. After this manual update (SQL update) we can browse the tables, etc. However, the next time the auto metadata fetch runs, all tables are again marked as non active.
To Reproduce
Steps to reproduce the behavior:
Go to Browse data in the frontend and select to browse a mysql database (running the affected engine) . There is not any table to explore.
Go to Admin->Table Metadata and select one of the mysql affected databases. Thre is not any schema on it
Go to your mysql client and query the Metabase database and run the following query
select md.id , md.name , md.
engine, sum(active) active_tables , sum(1) total_tables from metabase_table mt join metabase_database md on md.id = mt.db_id where true and md.
engine= 'mysql' group by 1,2, 3
See that some mysql are not affected but the affecgted ones 100% of the tables are marked as inactive
Expected behavior
After a scheduled or manual metadata fetch, the active tables (and columns) should keep "active" so users with permissions can browse those tables
Admins can administer the metadata of those mysql databases as regular
Editors can use any table-field in their query builders, field filters, etc
Severity
this is quite severe as disables the feature of browse data, build questions, add field filters, administer metadata, etc
Additional context
it seems that the mysql version affected is
Server version: 8.0.26-16 Percona Server (GPL), Release 16, Revision 3d64165
Metabase Diagnostic Info
The text was updated successfully, but these errors were encountered: