Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-5834

The system reports error when the number of models exported exceeds 256 at a time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0-beta
    • 5.0.0
    • Metadata
    • None

    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.

      Attachments

        Activity

          People

            Jueyi Zhimin Wu
            Jueyi Zhimin Wu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: