DESCRIPTION

JVMCBC-85: Prevent too far lokahead on view info parsing.

Motivation
----------
When the view "info" part is parsed that comes before the
actual rows, the code looks ahead to see if it already
finds the beginning of the streaming rows.

If the chunk that is returned is that large that the rows
have not started yet (which can be the case when debug()
is enabled), the lookahead goes to far, leading to an
IndexOutOfBoundsException.

Modifications
-------------
The code now checks if the lookahead is actually possible based
on the index provided and if not just keeps fetching data. This
prevents the exception and allows for larger info chunks.

Result
------
No IndexOutOfBoundsException on larger info chunks, including
when debug() is enabled.

Change-Id: If1850649c8f7643810c9224edc79ac563ef4d7e1


COMMENTS

author: Natasha Sullivan
date: 2014-12-17 10:00:01.303000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2014-12-17 10:01:50.677000000

Patch Set 1:

note that weirdly I couldn't get the original code to fail in a unit test, but it's clearly fixed with manual testing.

Since this sanity check makes sense when looking at the code my confidence level is good. Still wondering why I couldn't make it fail though.

-------------------------------------
author: Natasha Sullivan
date: 2014-12-17 10:02:07.248000000

Patch Set 1: Verified+1

-------------------------------------
