[ 
https://issues.apache.org/jira/browse/HBASE-21021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581799#comment-16581799
 ] 

Andrew Purtell commented on HBASE-21021:
----------------------------------------

bq. The test passes on master after considering the change and asserting for 
returned result isEmpty(). Hence, the ordering issue does not exist in master. 

Ok, but we still need a patch for master, please, just the unit test, just to 
let us know the issue isn't there now and to catch it as a regression going 
forward. Can't have coverage in branch-1 that doesn't extend forward for an 
expectation that should also carry forward. Once done +1 for branch-1 for me. 

I think this is a bug. Increment results are ordered (in effect) so this 
violates the principle of least surprise. Let's make sure Javadoc for append 
specifies the results are returned in order. Therefore I would like to further 
apply this to branch-1.2 and branch-1.3 even though there is a behavioral 
change. I guess ordering of the return results have not been an issue to date, 
because this issue has not been filed previously to my knowledge, so a further 
reordering won't matter, but going forward semantics will better match 
expectations. Let me know if you have a concern [~busbey] [~toffer]

> Result returned by Append operation should be ordered
> -----------------------------------------------------
>
>                 Key: HBASE-21021
>                 URL: https://issues.apache.org/jira/browse/HBASE-21021
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.3.0, 1.5.0
>            Reporter: Nihal Jain
>            Assignee: Nihal Jain
>            Priority: Major
>             Fix For: 1.5.0
>
>         Attachments: HBASE-21021.branch-1.001.patch
>
>
> *Problem:*
> The result returned by the append operation should be ordered. Currently, it 
> returns an unordered list, which may cause problems like if the user tries to 
> perform Result.getValue(byte[] family, byte[] qualifier), even if the 
> returned result has a value corresponding to (family, qualifier), the method 
> may return null as it performs a binary search over the  unsorted result 
> (which should have been sorted actually).
>  
> The result is enumerated by iterating over each entry of tempMemstore hashmap 
> (which will never be ordered) and adding the values (see 
> [HRegion.java#L7882|https://github.com/apache/hbase/blob/1b50fe53724aa62a242b74444f64adf7845048df/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java#L7882]).
>  
> *Actual:* The returned result is unordered
> *Expected:* Similar to increment op, the returned result should be ordered.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to