opensearch-project / index-management-dashboards-plugin

🗃 Manage policies and jobs and automate periodic data operations in OpenSearch Dashboards
https://opensearch.org/docs/latest/im-plugin/index/
Apache License 2.0
15 stars 86 forks source link

[BUG] 2.11.1 Take snapshot UI repo list can be slow #958

Open sandervandegeijn opened 10 months ago

sandervandegeijn commented 10 months ago

What is the bug?

https://github.com/opensearch-project/index-management-dashboards-plugin/assets/2643715/a473b2b8-a3a3-4ab7-ab29-a1f2711c3802

The list is populated after a while but it's unclear that the user needs to wait because opensearch is working.

What is the expected behavior? Implement waiting indicator

What is your host/environment? Default 2.11.1 images.

Do you have any screenshots? N/A

Do you have any additional context? N/A

kamingleung commented 9 months ago

@sandervandegeijn Initial thoughts – I think adding a waiting indicator make sense if it's trying to probe a list of repositories. The Select component supports displaying a loading indicator with disabled state.

I am also curious what are the reasons it takes a significant time to load the list. What types of repositories have you set up? That may help us thinking about edge cases when improving this (e.g. Should the loading time out? What error messages can we communicate to users?)

@bowenlan-amzn Would like to hear your insights on this.

bowenlan-amzn commented 9 months ago

The get repository is called when mounting this component https://github.com/opensearch-project/index-management-dashboards-plugin/blob/5da75d1e1f402824436b5b635127a52f9af7a554/public/pages/Snapshots/components/CreateSnapshotFlyout/CreateSnapshotFlyout.tsx#L74 This call itself is kind of slow.

A better way is to pass down the repositories from this flyout's parent component Snapshots table

sandervandegeijn commented 9 months ago

@sandervandegeijn Initial thoughts – I think adding a waiting indicator make sense if it's trying to probe a list of repositories. The Select component supports displaying a loading indicator with disabled state.

I am also curious what are the reasons it takes a significant time to load the list. What types of repositories have you set up? That may help us thinking about edge cases when improving this (e.g. Should the loading time out? What error messages can we communicate to users?)

@bowenlan-amzn Would like to hear your insights on this.

That's a valid question, we have two implementations in use: Azure and S3 on an on premise S3 solution. In both cases getting the list of snapshots is slow to dog slow. This also surprises me somewhat, especially since we're peaking at 25gbit/s from the S3 solution we have. That one isn't slow at all (but it's a ton of data).

But there is no overall state it seems where you can just get the current snapshots, it seems the whole repo is scanned each time. Having some kind of state would be beneficial (but introduces possible synchronisation problems). This would make the flow a lot faster I suspect.