Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jsbali opened this issue Jun 18, 2019 · 0 comments
Open

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

jsbali opened this issue Jun 18, 2019 · 0 comments

Comments

@jsbali
Copy link

jsbali commented Jun 18, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant