[
https://issues.apache.org/jira/browse/HBASE-18554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16142860#comment-16142860
]
Chia-Ping Tsai commented on HBASE-18554:
----------------------------------------
HRegion lock the row according to the Mutation's row, so the cells having
different rows will be processed without any locks. The data will be corrupted,
and user may be unaware of this problem because no error occur.
We need a workaround for keeping our compatibility.
# (2.0) Deprecate Append#add; Introduce an new method Append#addCell which
throw IOException. Also, the Append#add() will throw an unchecked exception.
# (3.0) Specify the IOException thrown by Append#add; Remove the Deprecated
from Append#add; Deprecate Append#addCell
# (4.0) Remove the Append#addCell
This issue cannot be resolved totally until we release 4.0.:P
> Append#add doesn't check the row of passed cell
> -----------------------------------------------
>
> Key: HBASE-18554
> URL: https://issues.apache.org/jira/browse/HBASE-18554
> Project: HBase
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Reid Chan
> Labels: beginner
> Attachments: HBASE-18554.master.001.patch,
> HBASE-18554.master.002.patch
>
>
> {code}
> @SuppressWarnings("unchecked")
> public Append add(final Cell cell) {
> // Presume it is KeyValue for now.
> byte [] family = CellUtil.cloneFamily(cell);
> List<Cell> list = this.familyMap.get(family);
> if (list == null) {
> list = new ArrayList<>(1);
> }
> // find where the new entry should be placed in the List
> list.add(cell);
> this.familyMap.put(family, list);
> return this;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)