Description
Back Ground
Kylin's model export feature generates a compressed package containing all selected models for export. However, when the number of selected models exceeds 256, the export function will fail and display an unfriendly error message to the user on a separate page, indicating an "IndexOutOfBoundsException: Index: 256".
Root Cause
The size of the list received from the frontend has exceeded the maximum limit set for form-urlencoded request parameters in Spring. The default limit for the automatic growth of arrays and collections in Spring's DataBinder class is 256.
Dev Design
A new system configuration item, "kylin.web.data-binder.auto-grow-collection-limit", has been added to "KylinConfigBase.java". This item allows users to set the limit for the size of array lists when handling request parameters. The default value is 256.
In the base controller class "NBasicController.java", the parameter "autoGrowCollectionLimit" is set to the value of the system configuration item "kylin.web.data-binder.auto-grow-collection-limit". It should be noted that setting this value too high could potentially lead to out of memory errors if the application is subject to network attacks, such as a request containing "ids[100000]". This change will affect all subclasses that inherit from the base controller class.