Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-3462 Add position and magic number checks to record (de)serializers
  3. FLINK-10356

Add sanity checks to SpillingAdaptiveSpanningRecordDeserializer

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6.0, 1.6.1, 1.7.0
    • Fix Version/s: None
    • Component/s: Runtime / Network

      Description

      SpillingAdaptiveSpanningRecordDeserializer doesn't have any consistency checks for usage calls or serializers behaving properly, e.g. to read only as many bytes as available/promised for that record. At least these checks should be added:

      1. Check that buffers have not been read from yet before adding them (this is an invariant SpillingAdaptiveSpanningRecordDeserializer works with and from what I can see, it is followed now.
      2. Check that after deserialization, we actually consumed recordLength bytes
        • If not, in the spanning deserializer, we currently simply skip the remaining bytes.
        • But in the non-spanning deserializer, we currently continue from the wrong offset.
      3. Protect against setNextBuffer being called before draining all available records

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                NicoK Nico Kruber
                Reporter:
                NicoK Nico Kruber
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: