caioricciuti / ch-ui

Use CH-UI to work with your data from Click House self-hosted with a user-friendly interface. CH-UI is a modern and feature-rich user interface for ClickHouse databases. It offers an intuitive platform for querying ClickHouse databases, executing queries, and visualizing metrics about your instance.
https://ch-ui.caioricciuti.com
MIT License
117 stars 12 forks source link

Deleted Tables Still Visible in UI #10

Closed digitaltim-de closed 2 months ago

digitaltim-de commented 2 months ago

Environment

NPM build

How did you encounter the bug?

Open the Interface

What did you expect?

  1. Changed, deleted Tables or fields are despite showing

Actual Result

I'm encountering an issue where tables that have been deleted from ClickHouse are still visible in the UI, even though they no longer exist in the database. This issue seems to be related to caching.

Steps to Reproduce:

Delete a table from ClickHouse. Perform a hard reload of the page or close and reopen the tabs. Observe that the deleted table still appears in the UI. Run SHOW TABLES in ClickHouse to confirm that the table has been deleted. Expected Behavior:

The deleted table should not appear in the UI and should be consistent with the result of the SHOW TABLES command.

Actual Behavior:

The deleted table continues to appear in the UI, even though it is no longer present in the database.

Additional Information:

I am using the latest version of ClickHouse installed via Docker. This issue also affects changed fields or datasets. Screenshots:

Screenshot showing the table still visible in the UI Screenshot showing the result of SHOW TABLES image image

It seems like a caching issue. Any advice or guidance on how to resolve this would be greatly appreciated.

caioricciuti commented 2 months ago

Heyy @digitaltim-de hope all is good, so I just spin up my instance and you are right, something is off... The way I found to go over this problem (for now) is to hard reset the on the settings page.

Screenshot 2024-09-02 at 15 54 21

I'll figure how to make the refresh buttons to work on this case...

Thanks for pointing out!

digitaltim-de commented 2 months ago

After every new Data insert - that dont show the data too - i need to do hard reset to see the actually data. Its very hard to work like that, but i am waiting for an fix as soon. Thank you.

caioricciuti commented 2 months ago

So, I've made some changes but I didn't had time to push them, it "solves" the refresh by adding a button on the data selector to clean cache... I'll try to review and push later today.

About the other issue you comment, after every data inert you mena CREATE db and tables? This is another issue, so please create an new one if possible and I'll get to it ASAP, thank you again for using CH-UI and for your patience.

digitaltim-de commented 2 months ago

The issue is similar to that issue to, thats why i post that here

Bug: Newly added data not displaying without hard refresh

Description: It seems like a caching or Redux-related issue. I've made a video to illustrate the problem better.

Steps to Reproduce:

  1. I opened the "Item" table, and initially, there was no data.
  2. Then, I added new data to the "Item" table.
  3. After reopening the "Item" table, no data was shown; no information or data was displayed. (That will be fine if it will work)
  4. Even after reloading the table, the data still did not appear. (Reload icon)
  5. Only after a hard refresh of the browser did the data finally show up. (Browser Refresh, Hard Refresh)

Expected Behavior: When new data is entered into the "Item" table, it should appear instantly upon revisiting the table without the need for a reload, reopen, or hard refresh.

https://github.com/user-attachments/assets/1c61fbef-0fcf-4491-9f12-d4870f885bf8

caioricciuti commented 2 months ago

I just pushed the clean cache button, the other one is a little bit more complicated since I need to set a condition on all create, insert, update and delete ddl to refresh the cache and reload. A lot of these problems are solved on V2, so I'll see if it worth the work to do it here too... thank you for your insights!