Skip to content
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

[BUG] Mapping size is larger than 10MB - Why is it hardcoded!? #2340

Open
asfoorial opened this issue Sep 13, 2022 · 4 comments
Open

[BUG] Mapping size is larger than 10MB - Why is it hardcoded!? #2340

asfoorial opened this issue Sep 13, 2022 · 4 comments
Labels
enhancement New feature or request needs more info Requires more information from poster

Comments

@asfoorial
Copy link

Good day all,

I checked mappings.js in the latest OpenSearch Dashboards source code and I found the following (line 323). Apparently, the maximum number of fields fetched is hardcoded to 10MB. Is there a reason for this? And will this be replaced with a configruation instead?

if (mappings) {
const maxMappingSize = mappings[0].length > 10 * 1024 * 1024;
if (maxMappingSize) {
console.warn(
Mapping size is larger than 10MB (${mappings[0].length / 1024 / 1024} MB). Ignoring...
);
mappingsResponse = '[{}]';
} else {
mappingsResponse = mappings[0];
}
loadMappings(JSON.parse(mappingsResponse));
}

@asfoorial asfoorial added bug Something isn't working untriaged labels Sep 13, 2022
@joshuarrrr
Copy link
Member

I imagine there are a number of performance and UI concerns we'd need to address if we decided to increase the mapping limit. But first we'd need to better understand the use case you have and figure out whether that's really the best approach (for example getting flattened results may be preferable.) Can you explain more about your index patterns, document structure, and how you ran into this limitation in the UI?

@joshuarrrr joshuarrrr added enhancement New feature or request needs more info Requires more information from poster and removed bug Something isn't working untriaged labels Sep 13, 2022
@asfoorial
Copy link
Author

In fact, I am using the Dashboards query console (Dev Tools). The auto-completion fails giving that error because I have many fields in my indices. So probably the way field auto-completion works in Dashboards needs to be fixed.

@asfoorial
Copy link
Author

I also think that all fields are loaded in the client automatically even if I don't request them!

@asfoorial
Copy link
Author

Note also that the size that makes fail is 19MB. I don't think that this is too much for the browser to handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs more info Requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants