Skip to content
  • Priyanka Sangam's avatar
    2fed1def
    Bug #28590428 NDB : BLOB RELATED ERROR HANDLING UNCLEAR AND INCONSISTENT · 2fed1def
    Priyanka Sangam authored
    A blob is stored in ndb in multiple parts. For a blob read, one
    read operation is executed per blob part. If a blob part is not
    found, the read fails with a 'row not found' error. This error
    indicates a corrupted blob, since a blob should never have a missing
    part. However, the 'row not found' error is reported as the
    overall result of the blob read. The handler ignores such errors
    and reports no error and zero rows.
    
    This is fixed by adding a check for the case where a blob part is
    not found. In this case, the 'row not found' error is overwritten
    to set a 'corrupted blob' error. The 'corrupted blob' error is read
    by the handler and causes the select to fail as expected. An
    additional fix is added for the getValue() API to prevent the
    'corrupted blob' error from being overwritten.
    
    Test cases are added in mtr to test various types of SELECTs. An
    autotest test case is added to count round-trips and check
    corrupted blob reads using both blob read APIs - readData() and
    getValue().
    
    Change-Id: I456b953cc054eba78c8a46849a2a169577d56aeb
    2fed1def
    Bug #28590428 NDB : BLOB RELATED ERROR HANDLING UNCLEAR AND INCONSISTENT
    Priyanka Sangam authored
    A blob is stored in ndb in multiple parts. For a blob read, one
    read operation is executed per blob part. If a blob part is not
    found, the read fails with a 'row not found' error. This error
    indicates a corrupted blob, since a blob should never have a missing
    part. However, the 'row not found' error is reported as the
    overall result of the blob read. The handler ignores such errors
    and reports no error and zero rows.
    
    This is fixed by adding a check for the case where a blob part is
    not found. In this case, the 'row not found' error is overwritten
    to set a 'corrupted blob' error. The 'corrupted blob' error is read
    by the handler and causes the select to fail as expected. An
    additional fix is added for the getValue() API to prevent the
    'corrupted blob' error from being overwritten.
    
    Test cases are added in mtr to test various types of SELECTs. An
    autotest test case is added to count round-trips and check
    corrupted blob reads using both blob read APIs - readData() and
    getValue().
    
    Change-Id: I456b953cc054eba78c8a46849a2a169577d56aeb
Loading