mingo-app / mingo

Found a bug? have a FR ?
59 stars 3 forks source link

Can not load data #564

Closed HiepPP closed 9 months ago

HiepPP commented 1 year ago

Describe the bug I am currently connected to the large database, but unfortunately, Mingo is showing the loading icon indefinitely. However, the database works fine on Mongo Compass and Robo3t.

Screenshots image image

Desktop (please complete the following information):

tothradoslav commented 1 year ago

Thank you. A large database means many collections or few collections with many documents? We have just made a change #533. So if this is related, should be solved in the next patch.

oftoapp commented 1 year ago

the same happens with me and my database is very small.

tothradoslav commented 1 year ago

Could you, guys, try this in the latest patch 1.12.2?

https://github.com/mingo-app/mingo/releases/tag/v1.12.2

We have made some more improvements, but those will be released in the next one...

pepkin88 commented 1 year ago

I have the same issue, upgrading to 1.12.2 didn't solve it for me.

I tried to fix https://github.com/mingo-app/mingo/issues/475 by doing a factory reset and re-adding the connection from scratch, as was advised in this comment: https://github.com/mingo-app/mingo/issues/475#issuecomment-1302124506

Unfortunately, every collection from the production database gives this infinite loader. Even small ones, with 1 or a few documents. The status bar shows correct document counts, it even says, that those documents are loaded, but they do not show in the main view.

image

In the Aggregator tab, the documents are loaded in the preview, but the results are empty.

image image

Similarly with NodeShell, no results.

image

Thank you. A large database means many collections or few collections with many documents? We have just made a change https://github.com/mingo-app/mingo/issues/533. So if this is related, should be solved in the next patch.

One of the collections has ~100M documents, so I guess it counts as a large database. And unfortunately, the newer version still has this issue (for me at least).

I also connected a dev database, no problems there.

pepkin88 commented 1 year ago

Update: I went to Collection & Statistics and chose Actions > Refresh meta information. I waited only a few seconds and got a message "Synced". After that I could read from any collection, no problem.

So it seems, that this loading of meta information is still necessary to do anything meaningful in the app. And if a large database is connected, the app doesn't load the metadata automatically, but still requires it for most operations.

One more small thing. Even after refreshing meta information, this bubble shows missing info:

image
tothradoslav commented 1 year ago

Thank you. So after you have done the "Refresh meta information", the queries started showing results?

pepkin88 commented 1 year ago

Yes

tothradoslav commented 1 year ago

Thanks, I think I found the problem. We will be releasing a new version shortly. I will notify you when the RC is out. If my solution didn't solve your problem, the RC version has DevTools enabled and i'd like to ask you to take a look inside the console to see if there are any errors listed after having this issue and sending them here.

tothradoslav commented 1 year ago

This has been resolved in the latest RC release, please check it out and let us know if the solution works as expected:

https://github.com/mingo-app/mingo/releases/tag/v1.13.0-rc1

pepkin88 commented 1 year ago

I can say, that in 1.30.0-rc1 the issue with not loading documents for large databases looks fixed 🎉. After adding the connection, I can browse any collection 👍.

However, there are still some smaller related issues remaining. The current state is passable, but I don't think it is desirable.

  1. Because large databases don't have the metadata automatically loaded, there's some error when opening this page: Zrzut ekranu 2023-05-17 o 12 05 20

I understand, that there's no data to show, but I'd suggest some explanation to show, informing, that it is necessary to manually execute the action "Refresh meta information".

  1. Even after loading the metadata, tooltips for collections are still bugged: image

I tried clearing cache and restarting the program, but they still look like this. BTW, the tooltip for the database is rendered correctly:

image
tothradoslav commented 1 year ago

Thank you, we have corrected both issues now.

pepkin88 commented 1 year ago

I tested the new version and have some feedback regarding the tooltips.

I have a main Mingo state, which has been through a lot of versions, but I also test a clean install.

After a factory reset, adding a fresh connection and refreshing meta information, unfortunately the data is not loaded into the tooltips.

image

There is also a regression, because the tooltip for database is also missing statistics:

image

On the main Mingo state, there is some data showing, but it is old data, probably fetched with one of the previous Mingo version and saved into the session file.

But even with this out-of-date data, a small bug appeared. It seems, that the hint about refreshing meta information show not only when the data is not loaded, but also when there is not and won't be any data to show or if the value is 0. For example: views, new/empty collections, small collections, whose size in kibibytes is rounded down to 0.

image image image

One more small thing. I would suggest to change the message to something like "Detailed meta information not loaded due to large database size." or something reflecting the actual criteria. My database has only ~40 collections, I don't think it's that many ;)

pepkin88 commented 1 year ago

One more thing I found, that I think might be related.

After executing "Refresh meta information", the information about indexes is cleared. By that I mean that I no longer can use the short query over an indexed field. Only when I go to the Indexes view and back to Documents, only then I can perform those shortcut queries.

tothradoslav commented 1 year ago

I think I solved this issue. I could not reproduce it any more. Thank you for the feedback! :)

tothradoslav commented 1 year ago

https://github.com/mingo-app/mingo/releases/tag/v1.13.1

pepkin88 commented 1 year ago

@tothradoslav Thanks, it seems like all issues from this thread are fixed!

Well almost. After refreshing meta information, the tooltip values don't get updated until the next render of the collection item on the list. Most of the time it can be caused by collapsing and expanding the collection list. But for pinned collections you'd have to unpin and pin, or just restart the app. I'd be nice, if those would rerender themself when the underlying data updates. I'm not familiar with Vue.js, so I don't know how difficult it is. But honestly, it's a small thing, it wouldn't be that big of a deal if it stays.

tothradoslav commented 1 year ago

Thanks, this is corrected now, will be in next patch.

tothradoslav commented 9 months ago

We have just released a release candidate with this issue corrected. Please check it out here: https://github.com/mingo-app/mingo/releases/tag/v.1.13.4