mymeiyi commented on pull request #3318: URL: https://github.com/apache/hbase/pull/3318#issuecomment-853660197
> Hi, Anoop, after reviewin the code, I do not think the problem is `lastCleanCell`. > > The problem here is that, after calling `scanner.next(cells, scannerContext)`, we then write these cells out to writer. These cells will reference HFileBlock inside the `kvs`, and after calling `kvs.shipped()`, all these cells will be invalid because we will release all the HFileBlock which are referenced by them. > > So here we can not call `kvs.shipped` inside the loop. The `writer.beforeShipped` call will only clone the cells which have been written to the writer but haven't been flushed out by the writer. But `kvs.shipped` will also release the HFileBlock for the cells which haven't been written to the writer yet, so calling writer.beforeShipped does not help here, in the next loop round we will write an invalid cell to writer and crash the regionserver. > > @mymeiyi Do I understand correctly? > > Thanks. Yes, this explanation is very clear. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org