[ https://issues.apache.org/jira/browse/HBASE-20711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16507562#comment-16507562 ]
Chia-Ping Tsai commented on HBASE-20711: ---------------------------------------- If we do the size check in converting the proto to mutation, we have to record the index of CellScanner in order to ignore the correct number of cells when encountering the exception. {code:java} int processedMutationIndex = 0; for (Action mutation : mutations) { // The non-null mArray[i] means the cell scanner has been read. if (mArray[processedMutationIndex++] == null) { skipCellsForMutation(mutation, cells); } }{code} > Save on a Cell iteration when writing > ------------------------------------- > > Key: HBASE-20711 > URL: https://issues.apache.org/jira/browse/HBASE-20711 > Project: HBase > Issue Type: Sub-task > Components: Performance > Reporter: stack > Assignee: stack > Priority: Minor > Attachments: HBASE-20711.branch-2.0.001.patch > > > This is a minor savings. We were doing a spin through all Cells on receipt > just to check their size when subsequently, we were doing an iteration of all > Cells to insert. It manifest as a little spike in perf output. This change > removes the purposed spin through Cells and just does size check as part of > the general Cell insert (perf spike no longer shows but the cost of the size > check still remains). > There is also a minor bug fix where on receipt we were using the Puts row > rather than the Cells row; client may have succeeded in submitting a Cell > that disagreed with the hosting Mutation and it would have been written as > something else altogether -- with the Puts row -- rather than being rejected. -- This message was sent by Atlassian JIRA (v7.6.3#76005)