Skip to content

Conversation

@jkaflik
Copy link
Contributor

@jkaflik jkaflik commented Sep 18, 2025

SchemaBox component is used for table mapping in mirror creation flow. When component is mounted, all the schemas are collapsed. However, what is currently observed, regardless of box is collapsed, fetchTablesForSchema is always executed causing overhead requests being sent to API.

Desired behaviour would be tables are fetched only if box is being expanded. This PR fixes it, trying to keep the functionality of reloading results when the initialLoadOnly prop is changed. It has a side effect of retried request if we collapse and expand box again, but I think it's an edge case.

It's not a pain in most cases (it's less likely to have that many schemas it overloads API), but for my testing I had a peer source that consisted of >100 schemas.

SchemaBox component is used for table mapping in mirror creation flow. When component is mounted, all the schemas are collapsed. However, what is currently observed, regardless of box is collapsed, `fetchTablesForSchema` is always executed causing overhead requests being sent to API.

Desired behaviour would be tables are fetched only if box is being expanded. This PR fixes it, trying to keep the functionality of reloading results when the `initialLoadOnly` prop is changed. It has a side effect of retried request if we collapse and expand box again, but I think it's an edge case.

It's not a pain in most cases (it's less likely to have that many schemas it overloads API), but for my testing I had a peer source that consisted of >100 schemas.
@CLAassistant
Copy link

CLAassistant commented Sep 18, 2025

CLA assistant check
All committers have signed the CLA.

@heavycrystal heavycrystal merged commit 6b76707 into main Sep 18, 2025
14 checks passed
@heavycrystal heavycrystal deleted the kk/schemabox-fix-ddos branch September 18, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants