Skip to content

Appends with no returns and few errors can break deserialization #207

@jsbali

Description

@jsbali

If a batch contains 4 appends with return_result as false and last two fail which can due to multiple reasons say the region was moved or was unavailable.

Then the response returned by hbase will contain only two ResultOrException elements with index say 2 and 3 (batch size 4).
Deserializing the above will throw up on
https://github.com/OpenTSDB/asynchbase/blob/master/src/MultiAction.java#L627 because we don't do a bounds check and will receive an IndexOutOfBoundsException.

The simplest fix can be to add a bounds check for both n < batch.size() and n!=index.
But I may be missing some things so need your attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions