kkewwei opened a new issue, #14961: URL: https://github.com/apache/lucene/issues/14961
### Description In our product, the `fielddata` memory usage can soar up to 12 GB, which makes the system highly prone to running out of memory. At present, we conduct memory checks only after the `OrdinalMap` has been constructed. However, this approach is merely a post - event measure. If multiple `OrdinalMaps` are built simultaneously or a single `OrdinalMap` is extremely large, leading to the exhaustion of memory, checking the memory usage at that point becomes completely ineffective. <img width="3330" height="1268" alt="Image" src="https://github.com/user-attachments/assets/7c4381ca-bb0e-4f25-8867-f25ca06d9e0c" /> Could we implement dynamic monitoring of `OrdinalMap` usage during its construction? For instance, we could check the memory usage every time 1024 terms are processed. This way, we can detect potential memory over - consumption issues in a more timely manner and take proactive measures to avoid system crashes caused by insufficient memory. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org