Solr
  1. Solr
  2. SOLR-8494

bin/post (SimplePostTool) cannot index files larger than 2.1GB

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.10.4, 5.3.1, 5.4
    • Fix Version/s: 5.5, 6.0
    • Component/s: SimplePostTool
    • Labels:
      None

      Description

      The SimplePostTool used by the bin/post script always set the fixed length streaming mode with an integer which limits the size of the file being uploaded to 2.1GB (Integer.MAX_VALUE).

      SimplePostTool version 5.0.0
      Posting files to [base] url http://localhost:8983/solr/xyz/update...
      Entering auto mode. File endings considered are xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
      POSTing file xyz.json (application/json) to [base]
      Exception in thread "main" java.lang.IllegalArgumentException: invalid content length
          at java.net.HttpURLConnection.setFixedLengthStreamingMode(HttpURLConnection.java:161)
          at org.apache.solr.util.SimplePostTool.postData(SimplePostTool.java:887)
          at org.apache.solr.util.SimplePostTool.postFile(SimplePostTool.java:794)
          at org.apache.solr.util.SimplePostTool.postFiles(SimplePostTool.java:515)
          at org.apache.solr.util.SimplePostTool.postFiles(SimplePostTool.java:435)
          at org.apache.solr.util.SimplePostTool.doFilesMode(SimplePostTool.java:311)
          at org.apache.solr.util.SimplePostTool.execute(SimplePostTool.java:178)
          at org.apache.solr.util.SimplePostTool.main(SimplePostTool.java:167)
      
      1. SOLR-8494.patch
        2 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Trivial patch to use long instead of int when setting the content length.

        Show
        Shalin Shekhar Mangar added a comment - Trivial patch to use long instead of int when setting the content length.
        Hide
        ASF subversion and git services added a comment -

        Commit 1723360 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1723360 ]

        SOLR-8494: SimplePostTool and therefore the bin/post script cannot upload files larger than 2.1GB

        Show
        ASF subversion and git services added a comment - Commit 1723360 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1723360 ] SOLR-8494 : SimplePostTool and therefore the bin/post script cannot upload files larger than 2.1GB
        Hide
        ASF subversion and git services added a comment -

        Commit 1723365 from shalin@apache.org in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1723365 ]

        SOLR-8494: SimplePostTool and therefore the bin/post script cannot upload files larger than 2.1GB

        Show
        ASF subversion and git services added a comment - Commit 1723365 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1723365 ] SOLR-8494 : SimplePostTool and therefore the bin/post script cannot upload files larger than 2.1GB

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development