> However, the tuple_id for a specific tuple might change after rebuild() My understanding is that the TupleID is only conceptual, so this is probably not a concern. Further, since we only have one query at a time, and don’t read a block until it’s inserted into, I think we should be fine.
Thanks Shixuan! I’ll clarify all this in an amendment to that comment in a PR in the near future. > On Jul 17, 2016, at 00:15, Shixuan Fan <[email protected]> wrote: > > It seems that bulkInsert() will put the newly inserted tuples right after the > last tuple of the block, so getAttributeValue() and similar methods should > work. I didn't check bulkInsert() in all implementations of > TupleStorageSubBlock, so it might be great if you could look into that. > > However, the tuple_id for a specific tuple might change after rebuild(), so > I'm not sure if that would be considered safe or not. > > Shixuan > ________________________________ > From: Navneet Potti <[email protected]> > Sent: Saturday, July 16, 2016 9:52:51 PM > To: [email protected] > Subject: Re: Warning in TupleStorageSubBlock.hpp > > Ah, so that just means that index subblocks may potentially have become dirty > due to the bulkInsert. However, it doesn’t mean that functions like > getAttributeValue() are potentially broken too, right? In other words, the > TupleStorageSubBlock itself is still guaranteed to be in a consistent state, > only that it may be inconsistent with any index subblocks? > > Thanks Shixuan! > > >> On Jul 16, 2016, at 21:27, Shixuan Fan <[email protected]> wrote: >> >> Hi Navneet, >> >> >> My understanding is that after calling bulkInsertTuples, >> bulkInsertTuplesWithRemappedAttributes or insertTupleInBatch, the >> consistency of the block is broken and the index will not work until >> rebuild() is called. Thus any operation based on index or tuple order will >> not be safe. >> >> >> Hope that others could give a more detailed explanation. :) >> >> >> Shixuan >> >> ________________________________ >> From: Navneet Potti <[email protected]> >> Sent: Saturday, July 16, 2016 8:47:41 PM >> To: [email protected] >> Subject: Warning in TupleStorageSubBlock.hpp >> >> Hi Quicksteppers >> I just came across this warning in the documentation for >> TupleStorageSubBlock::bulkInsertTuples and >> bulkInsertTuplesWithRemappedAttributes functions. Can someone explain what >> it means? >> Cheers, >> Nav >> >> https://github.com/apache/incubator-quickstep/blob/expt_bloom_filter_hash_fn/storage/TupleStorageSubBlock.hpp#L253 >> >> <https://github.com/apache/incubator-quickstep/blob/expt_bloom_filter_hash_fn/storage/TupleStorageSubBlock.hpp#L253> >> >> * @warning The inserted tuples may be placed in an "incorrect" or >> * sub-optimal locations in this TupleStorageSubBlock. The only >> * methods which are safe to call between bulkInsertTuples() and >> * rebuild() are insertTupleInBatch(), bulkInsertTuples(), and >> * bulkInsertTuplesWithRemappedAttributes(). >> >> >
