[ https://issues.apache.org/jira/browse/HBASE-20711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521370#comment-16521370 ]
stack commented on HBASE-20711: ------------------------------- bq. Do you mean the path using the CellScanner (see below)? No. I meant this: {code} BTW, why doing the following change? The change makes us copy the row many times. Is it related another bugfix boss? - .setRow(put.getRow()) + cell = cellBuilder.clear() + .setRow(proto.getRow().toByteArray()) {code} I was afraid that the row in the Put might not match what was in the Cell. If it didn't, somehow, then we'd pass in a Cell that was not supplied by the client? I like your point that it means we'll make a new row each time... that we should avoid that if we can. I see this size check costing us about 3% of CPU when writing. Maybe 1% is the iteration cost? Less? If it makes the code easier, we should keep it as is? > 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)