Eng 6530 new

DR buffer should not have a tail, move open transaction to the next buffer if possible.
In this case, the current block of zero size will be rolled back and
deallocated. This is the only purpose of creating the zero length block,
otherwise rollbackTo() method will crash for m_currBlock is null.


On Thu, Aug 14, 2014 at 2:03 PM, aweisberg <notifications@github.com> wrote:

> In src/ee/storage/TupleStreamBase.cpp:
>
> >      if (!buffer) {
> >          throwFatalException("Failed to claim managed buffer for Export.");
> >      }
> > +    m_currBlock = new StreamBlock(buffer, blockSize, uso);
> > +    if (blockSize > m_defaultCapacity) {
> > +        m_currBlock->setType(LARGE_STREAM_BLOCK);
> > +    }
> > +
> > +    if (blockSize == 0) {
> > +        rollbackTo(uso);
> > +        throw SQLException(SQLException::volt_output_buffer_overflow, "Transaction is bigger than DR Buffer size");
>
> So in this case m_currBlock is allocated with a block size of 0? Seems
> kind of weird. So the next transaction will deallocate and replace it?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/VoltDB/voltdb/pull/1627/files#r16254636>.
>



-- 
*Yang Lu,* Software Engineer Intern
*VoltDB, Inc.*
*E:* yang@voltdb.com
www.voltdb.com <http://voltdb.com/>
Follow VoltDB on Twitter <https://twitter.com/voltdb>, Facebook
<https://www.facebook.com/VoltDB?sk=wall>, and LinkedIn
<http://www.linkedin.com/company/voltdb>