Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6577

Give earlier and better error message for invalid CRC

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      From digging into LUCENE-6576:

      We use a 32-bit CRC but store it in 64-bits, but today 32 bits are unused. We should check this on both read and write and if bits are invalid (because something is wrong in the JVM, or because on-disk stuff just got corrupted in that way), deliver a good exception.

        Activity

        Hide
        rcmuir Robert Muir added a comment -

        Here is a stab. No tests yet in TestCodecUtil.

        Show
        rcmuir Robert Muir added a comment - Here is a stab. No tests yet in TestCodecUtil.
        Hide
        thetaphi Uwe Schindler added a comment -

        +1
        This will detect JVM bugs early, also while writing the checksum!

        Show
        thetaphi Uwe Schindler added a comment - +1 This will detect JVM bugs early, also while writing the checksum!
        Hide
        mikemccand Michael McCandless added a comment -

        +1

        Show
        mikemccand Michael McCandless added a comment - +1
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1685927 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1685927 ]

        LUCENE-6577: Give earlier and better error message for invalid CRC

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1685927 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1685927 ] LUCENE-6577 : Give earlier and better error message for invalid CRC
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1685928 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1685928 ]

        LUCENE-6577: Give earlier and better error message for invalid CRC

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1685928 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1685928 ] LUCENE-6577 : Give earlier and better error message for invalid CRC
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release
        Hide
        bneelima84 Neelima added a comment -

        Does these checks be valid on z/OS (big-endian) ?

        Show
        bneelima84 Neelima added a comment - Does these checks be valid on z/OS (big-endian) ?
        Hide
        mikemccand Michael McCandless added a comment -

        Does these checks be valid on z/OS (big-endian) ?

        Neelima: yes ... Lucene processes the bytes for checksum purposes in its own order, regardless of the byte order of the underlying platform.

        But then, Java is "write once test everywhere" and I don't know of specific tests on z/OS in the past ...

        Show
        mikemccand Michael McCandless added a comment - Does these checks be valid on z/OS (big-endian) ? Neelima : yes ... Lucene processes the bytes for checksum purposes in its own order, regardless of the byte order of the underlying platform. But then, Java is "write once test everywhere" and I don't know of specific tests on z/OS in the past ...

          People

          • Assignee:
            Unassigned
            Reporter:
            rcmuir Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development