Lucene - Core
  1. Lucene - Core
  2. LUCENE-6577

Give earlier and better error message for invalid CRC

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major 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
        Robert Muir added a comment -

        Here is a stab. No tests yet in TestCodecUtil.

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

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

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

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        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
        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
        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
        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
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

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

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

        Show
        Neelima added a comment - Does these checks be valid on z/OS (big-endian) ?
        Hide
        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
        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:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development