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

Hadoop QA commented on HBASE-15236:
-----------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green} 0m 
0s {color} | {color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s 
{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 
0s {color} | {color:green} The patch appears to include 4 new or modified test 
files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 3m 
17s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 55s 
{color} | {color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 36s 
{color} | {color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 4m 
35s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
14s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 
54s {color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 33s 
{color} | {color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 34s 
{color} | {color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 
41s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 50s 
{color} | {color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 50s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 33s 
{color} | {color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 33s 
{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 4m 
10s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 
17s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 
0s {color} | {color:green} Patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 
28m 46s {color} | {color:green} Patch does not cause any errors with Hadoop 
2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.1 2.6.2 2.6.3 2.7.1. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 
32s {color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 42s 
{color} | {color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 39s 
{color} | {color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 24m 16s {color} 
| {color:red} hbase-server in the patch failed with JDK v1.8.0. {color} |
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 67m 19s {color} 
| {color:red} hbase-server in the patch failed with JDK v1.7.0_79. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 
23s {color} | {color:green} Patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 144m 15s {color} 
| {color:black} {color} |
\\
\\
|| Reason || Tests ||
| JDK v1.8.0 Failed junit tests | hadoop.hbase.ipc.TestSimpleRpcScheduler |
| JDK v1.7.0_79 Failed junit tests | hadoop.hbase.io.hfile.TestCacheConfig |
| JDK v1.7.0_79 Timed out junit tests | 
org.apache.hadoop.hbase.client.TestReplicasClient |
|   | org.apache.hadoop.hbase.coprocessor.TestRegionObserverInterface |
|   | org.apache.hadoop.hbase.mapreduce.TestWALPlayer |
|   | org.apache.hadoop.hbase.coprocessor.TestHTableWrapper |
|   | org.apache.hadoop.hbase.client.TestSnapshotCloneIndependence |
|   | org.apache.hadoop.hbase.mapreduce.TestTableInputFormat |
|   | org.apache.hadoop.hbase.client.TestFromClientSide |
|   | org.apache.hadoop.hbase.client.TestMultipleTimestamps |
|   | org.apache.hadoop.hbase.snapshot.TestSnapshotClientRetries |
|   | org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer2 |
|   | org.apache.hadoop.hbase.coprocessor.TestRegionObserverScannerOpenHook |
|   | org.apache.hadoop.hbase.TestFullLogReconstruction |
|   | org.apache.hadoop.hbase.util.TestHBaseFsckOneRS |
|   | org.apache.hadoop.hbase.TestMultiVersions |
|   | 
org.apache.hadoop.hbase.security.visibility.TestEnforcingScanLabelGenerator |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLablesWithGroups |
|   | 
org.apache.hadoop.hbase.replication.regionserver.TestRegionReplicaReplicationEndpoint
 |
|   | org.apache.hadoop.hbase.wal.TestWALFiltering |
|   | org.apache.hadoop.hbase.coprocessor.TestRegionServerObserver |
|   | org.apache.hadoop.hbase.filter.TestFilterWrapper |
|   | org.apache.hadoop.hbase.security.access.TestAccessController2 |
|   | org.apache.hadoop.hbase.wal.TestDefaultWALProviderWithHLogKey |
|   | org.apache.hadoop.hbase.mapreduce.TestCellCounter |
|   | org.apache.hadoop.hbase.TestZooKeeper |
|   | org.apache.hadoop.hbase.mapreduce.TestRowCounter |
|   | org.apache.hadoop.hbase.wal.TestWALSplitCompressed |
|   | org.apache.hadoop.hbase.constraint.TestConstraint |
|   | org.apache.hadoop.hbase.filter.TestFilterWithScanLimits |
|   | org.apache.hadoop.hbase.client.TestClientScannerRPCTimeout |
|   | org.apache.hadoop.hbase.client.TestMultiRespectsLimits |
|   | org.apache.hadoop.hbase.quotas.TestQuotaTableUtil |
|   | org.apache.hadoop.hbase.filter.TestScanRowPrefix |
|   | org.apache.hadoop.hbase.mob.compactions.TestPartitionedMobCompactor |
|   | org.apache.hadoop.hbase.util.hbck.TestOfflineMetaRebuildHole |
|   | org.apache.hadoop.hbase.client.TestMetaWithReplicas |
|   | org.apache.hadoop.hbase.client.TestClientTimeouts |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelsWithDefaultVisLabelService
 |
|   | org.apache.hadoop.hbase.util.TestHBaseFsckEncryption |
|   | org.apache.hadoop.hbase.coprocessor.TestWALObserver |
|   | org.apache.hadoop.hbase.mapreduce.TestImportTSVWithOperationAttributes |
|   | org.apache.hadoop.hbase.client.TestFromClientSide3 |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelsWithCustomVisLabService
 |
|   | org.apache.hadoop.hbase.mob.mapreduce.TestMobSweepReducer |
|   | org.apache.hadoop.hbase.TestClusterBootOrder |
|   | org.apache.hadoop.hbase.client.TestScannerTimeout |
|   | org.apache.hadoop.hbase.util.hbck.TestOfflineMetaRebuildOverlap |
|   | org.apache.hadoop.hbase.util.TestMiniClusterLoadEncoded |
|   | org.apache.hadoop.hbase.util.TestCoprocessorScanPolicy |
|   | org.apache.hadoop.hbase.io.encoding.TestDataBlockEncoders |
|   | org.apache.hadoop.hbase.mob.compactions.TestMobCompactor |
|   | org.apache.hadoop.hbase.client.TestSplitOrMergeStatus |
|   | org.apache.hadoop.hbase.util.TestMiniClusterLoadSequential |
|   | org.apache.hadoop.hbase.TestJMXListener |
|   | org.apache.hadoop.hbase.coprocessor.TestClassLoading |
|   | org.apache.hadoop.hbase.util.TestFanOutOneBlockAsyncDFSOutput |
|   | org.apache.hadoop.hbase.client.TestIncrementFromClientSideWithCoprocessor 
|
|   | org.apache.hadoop.hbase.client.TestAdmin2 |
|   | org.apache.hadoop.hbase.replication.regionserver.TestReplicationSink |
|   | org.apache.hadoop.hbase.coprocessor.TestCoprocessorTableEndpoint |
|   | org.apache.hadoop.hbase.client.TestAdmin1 |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelsOpWithDifferentUsersNoACL
 |
|   | org.apache.hadoop.hbase.io.hfile.TestScannerSelectionUsingTTL |
|   | org.apache.hadoop.hbase.coprocessor.TestRowProcessorEndpoint |
|   | org.apache.hadoop.hbase.mob.TestExpiredMobFileCleaner |
|   | org.apache.hadoop.hbase.filter.TestFuzzyRowAndColumnRangeFilter |
|   | org.apache.hadoop.hbase.security.access.TestAccessControlFilter |
|   | org.apache.hadoop.hbase.TestAcidGuarantees |
|   | org.apache.hadoop.hbase.TestGlobalMemStoreSize |
|   | org.apache.hadoop.hbase.client.TestSnapshotMetadata |
|   | org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelsWithACL |
|   | org.apache.hadoop.hbase.io.encoding.TestChangingEncoding |
|   | org.apache.hadoop.hbase.io.hfile.TestSeekBeforeWithInlineBlocks |
|   | org.apache.hadoop.hbase.zookeeper.lock.TestZKInterProcessReadWriteLock |
|   | org.apache.hadoop.hbase.client.TestClientPushback |
|   | org.apache.hadoop.hbase.client.TestCheckAndMutate |
|   | org.apache.hadoop.hbase.io.hfile.TestForceCacheImportantBlocks |
|   | org.apache.hadoop.hbase.io.hfile.TestHFileBlockIndex |
|   | org.apache.hadoop.hbase.coprocessor.TestOpenTableInCoprocessor |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelsWithDeletes |
|   | org.apache.hadoop.hbase.TestRegionRebalancing |
|   | org.apache.hadoop.hbase.mapreduce.TestSyncTable |
|   | org.apache.hadoop.hbase.mapreduce.TestCopyTable |
|   | org.apache.hadoop.hbase.mapreduce.TestHashTable |
|   | org.apache.hadoop.hbase.client.TestReplicaWithCluster |
|   | org.apache.hadoop.hbase.util.TestRegionSplitter |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelReplicationWithExpAsString
 |
|   | org.apache.hadoop.hbase.security.access.TestCellACLWithMultipleVersions |
|   | org.apache.hadoop.hbase.client.TestHTableMultiplexerFlushCache |
|   | org.apache.hadoop.hbase.client.TestClientOperationInterrupt |
|   | org.apache.hadoop.hbase.filter.TestMultiRowRangeFilter |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelsReplication |
|   | org.apache.hadoop.hbase.TestHBaseOnOtherDfsCluster |
|   | org.apache.hadoop.hbase.util.TestMergeTable |
|   | org.apache.hadoop.hbase.util.TestRegionMover |
|   | org.apache.hadoop.hbase.util.hbck.TestOfflineMetaRebuildBase |
|   | org.apache.hadoop.hbase.util.TestMergeTool |
|   | org.apache.hadoop.hbase.security.visibility.TestVisibilityWithCheckAuths |
|   | org.apache.hadoop.hbase.security.access.TestCellACLs |
|   | org.apache.hadoop.hbase.client.TestRpcControllerFactory |
|   | org.apache.hadoop.hbase.filter.TestColumnRangeFilter |
|   | 
org.apache.hadoop.hbase.replication.regionserver.TestRegionReplicaReplicationEndpointNoMaster
 |
|   | org.apache.hadoop.hbase.client.TestTimestampsFilter |
|   | org.apache.hadoop.hbase.TestIOFencing |
|   | org.apache.hadoop.hbase.util.TestMiniClusterLoadParallel |
|   | org.apache.hadoop.hbase.mapreduce.TestSecureLoadIncrementalHFiles |
|   | 
org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFilesUseSecurityEndPoint |
|   | org.apache.hadoop.hbase.snapshot.TestRestoreFlushSnapshotFromClient |
|   | org.apache.hadoop.hbase.client.TestHCM |
|   | org.apache.hadoop.hbase.mapreduce.TestTimeRangeMapRed |
|   | org.apache.hadoop.hbase.mapreduce.TestImportExport |
|   | 
org.apache.hadoop.hbase.security.visibility.TestDefaultScanLabelGeneratorStack |
|   | org.apache.hadoop.hbase.security.access.TestWithDisabledAuthorization |
|   | org.apache.hadoop.hbase.io.hfile.TestCacheOnWrite |
|   | org.apache.hadoop.hbase.io.encoding.TestLoadAndSwitchEncodeOnDisk |
|   | 
org.apache.hadoop.hbase.coprocessor.TestRegionServerCoprocessorExceptionWithRemove
 |
|   | 
org.apache.hadoop.hbase.security.visibility.TestVisibilityLabelsWithSLGStack |
|   | org.apache.hadoop.hbase.snapshot.TestMobFlushSnapshotFromClient |
|   | org.apache.hadoop.hbase.client.TestMobRestoreSnapshotFromClient |
|   | org.apache.hadoop.hbase.util.TestHBaseFsckMOB |
|   | org.apache.hadoop.hbase.mob.TestDefaultMobStoreFlusher |
|   | org.apache.hadoop.hbase.mob.mapreduce.TestMobSweepJob |
|   | org.apache.hadoop.hbase.coprocessor.TestRegionObserverBypass |
|   | org.apache.hadoop.hbase.TestHColumnDescriptorDefaultVersions |
|   | 
org.apache.hadoop.hbase.client.TestRestoreSnapshotFromClientWithRegionReplicas |
|   | org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFiles |
|   | org.apache.hadoop.hbase.client.TestTableSnapshotScanner |
|   | org.apache.hadoop.hbase.client.TestMobCloneSnapshotFromClient |
|   | org.apache.hadoop.hbase.security.access.TestScanEarlyTermination |
|   | 
org.apache.hadoop.hbase.replication.regionserver.TestReplicationWALReaderManager
 |
|   | org.apache.hadoop.hbase.fs.TestBlockReorder |
|   | org.apache.hadoop.hbase.snapshot.TestFlushSnapshotFromClient |
|   | org.apache.hadoop.hbase.client.TestRestoreSnapshotFromClient |
|   | 
org.apache.hadoop.hbase.client.TestCloneSnapshotFromClientWithRegionReplicas |
|   | org.apache.hadoop.hbase.client.TestFromClientSideNoCodec |
|   | org.apache.hadoop.hbase.mapreduce.TestImportTSVWithVisibilityLabels |
|   | org.apache.hadoop.hbase.wal.TestDefaultWALProvider |
|   | 
org.apache.hadoop.hbase.coprocessor.TestRegionServerCoprocessorExceptionWithAbort
 |
|   | 
org.apache.hadoop.hbase.coprocessor.TestMasterCoprocessorExceptionWithRemove |
|   | org.apache.hadoop.hbase.client.TestBlockEvictionFromClient |
|   | org.apache.hadoop.hbase.client.TestCloneSnapshotFromClient |
|   | org.apache.hadoop.hbase.util.TestConnectionCache |
|   | org.apache.hadoop.hbase.mapreduce.TestImportTSVWithTTLs |
|   | org.apache.hadoop.hbase.security.access.TestZKPermissionsWatcher |
|   | org.apache.hadoop.hbase.replication.TestMultiSlaveReplication |
|   | org.apache.hadoop.hbase.io.hfile.TestHFileBlock |
|   | 
org.apache.hadoop.hbase.mapreduce.TestSecureLoadIncrementalHFilesSplitRecovery |
|   | org.apache.hadoop.hbase.wal.TestBoundedRegionGroupingStrategy |
|   | org.apache.hadoop.hbase.wal.TestWALFactory |
|   | org.apache.hadoop.hbase.client.TestIncrementsFromClientSide |
|   | org.apache.hadoop.hbase.client.TestHTableMultiplexer |
|   | org.apache.hadoop.hbase.client.TestMobSnapshotFromClient |
|   | org.apache.hadoop.hbase.quotas.TestQuotaAdmin |
|   | org.apache.hadoop.hbase.coprocessor.TestCoprocessorStop |
|   | org.apache.hadoop.hbase.client.TestSnapshotFromClientWithRegionReplicas |
|   | org.apache.hadoop.hbase.filter.TestFuzzyRowFilterEndToEnd |
|   | org.apache.hadoop.hbase.mapreduce.TestTableSnapshotInputFormat |
|   | org.apache.hadoop.hbase.client.TestScannersFromClientSide |
|   | org.apache.hadoop.hbase.client.TestMetaCache |
|   | org.apache.hadoop.hbase.replication.TestMasterReplication |
|   | org.apache.hadoop.hbase.TestPartialResultsFromClientSide |
|   | 
org.apache.hadoop.hbase.coprocessor.TestMasterCoprocessorExceptionWithAbort |
|   | org.apache.hadoop.hbase.client.TestSnapshotFromClient |
|   | org.apache.hadoop.hbase.client.TestResultSizeEstimation |
|   | org.apache.hadoop.hbase.io.TestFileLink |
|   | org.apache.hadoop.hbase.mapred.TestTableSnapshotInputFormat |
|   | org.apache.hadoop.hbase.util.TestFSUtils |
|   | org.apache.hadoop.hbase.mapreduce.TestLoadIncrementalHFilesSplitRecovery |
|   | org.apache.hadoop.hbase.io.encoding.TestBufferedDataBlockEncoder |
|   | org.apache.hadoop.hbase.client.TestMobSnapshotCloneIndependence |
|   | org.apache.hadoop.hbase.util.TestHBaseFsckTwoRS |
|   | org.apache.hadoop.hbase.mapreduce.TestImportTsv |
|   | org.apache.hadoop.hbase.io.encoding.TestEncodedSeekers |
|   | org.apache.hadoop.hbase.wal.TestWALSplit |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12791714/HBASE-15236-master-v3.patch
 |
| JIRA Issue | HBASE-15236 |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  hadoopcheck  
hbaseanti  checkstyle  compile  |
| uname | Linux asf900.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP 
PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh
 |
| git revision | master / 05161fc |
| Default Java | 1.7.0_79 |
| Multi-JDK versions |  /home/jenkins/tools/java/jdk1.8.0:1.8.0 
/usr/local/jenkins/java/jdk1.7.0_79:1.7.0_79 |
| findbugs | v3.0.0 |
| unit | 
https://builds.apache.org/job/PreCommit-HBASE-Build/876/artifact/patchprocess/patch-unit-hbase-server-jdk1.8.0.txt
 |
| unit | 
https://builds.apache.org/job/PreCommit-HBASE-Build/876/artifact/patchprocess/patch-unit-hbase-server-jdk1.7.0_79.txt
 |
| unit test logs |  
https://builds.apache.org/job/PreCommit-HBASE-Build/876/artifact/patchprocess/patch-unit-hbase-server-jdk1.8.0.txt
 
https://builds.apache.org/job/PreCommit-HBASE-Build/876/artifact/patchprocess/patch-unit-hbase-server-jdk1.7.0_79.txt
 |
| JDK v1.7.0_79  Test Results | 
https://builds.apache.org/job/PreCommit-HBASE-Build/876/testReport/ |
| modules | C: hbase-server U: hbase-server |
| Console output | 
https://builds.apache.org/job/PreCommit-HBASE-Build/876/console |
| Powered by | Apache Yetus 0.2.0   http://yetus.apache.org |


This message was automatically generated.



> Inconsistent cell reads over multiple bulk-loaded HFiles
> --------------------------------------------------------
>
>                 Key: HBASE-15236
>                 URL: https://issues.apache.org/jira/browse/HBASE-15236
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Appy
>            Assignee: Appy
>         Attachments: HBASE-15236-master-v2.patch, 
> HBASE-15236-master-v3.patch, HBASE-15236.patch, TestWithSingleHRegion.java, 
> tables_data.zip
>
>
>  If there are two bulkloaded hfiles in a region with same seqID, same 
> timestamps and duplicate keys*, get and scan may return different values for 
> a key. Not sure how this would happen, but one of our customer uploaded a 
> dataset with 2 files in a single region and both having same bulk load 
> timestamp. These files are small ~50M (I couldn't find any setting for max 
> file size that could lead to 2 files). The range of keys in two hfiles are 
> overlapping to some extent, but not fully (so the two files are because of 
> region merge).
> In such a case, depending on file sizes (used in 
> StoreFile.Comparators.SEQ_ID), we may get different values for the same cell 
> (say "r", "cf:50") depending on what we call: get "r" "cf:50" or get "r" 
> "cf:".
> To replicate this, i ran ImportTsv twice with 2 different csv files but same 
> timestamp (-Dimporttsv.timestamp=1). Collected two resulting hfiles in a 
> single directory and loaded with LoadIncrementalHFiles. Here are the commands.
> {noformat}
> //CSV files should be in hdfs:///user/hbase/tmp
> sudo -u hbase hbase org.apache.hadoop.hbase.mapreduce.ImportTsv  
> -Dimporttsv.columns=HBASE_ROW_KEY,c:1,c:2,c:3,c:4,c:5,c:6 
> -Dimporttsv.separator='|' -Dimporttsv.timestamp=1 
> -Dimporttsv.bulk.output=hdfs:///user/hbase/1 t tmp
> {noformat}
> tables_data.zip contains three tables: t, t2, and t3.
> To load these tables and test with them, use the attached 
> TestWithSingleHRegion.java. (Change ROOT_DIR and TABLE_NAME variables 
> appropriately)
> Hfiles for table 't':
> 1) 07922ac90208445883b2ddc89c424c89 : length = 1094: KVs = (c:5, 55) (c:6, 66)
> 2) 143137fa4fa84625b4e8d1d84a494f08 : length = 1192: KVs = (c:1, 1) (c:2, 2) 
> (c:3, 3) (c:4, 4) (c:5, 5) (c:6, 6)
> Get returns 5  where as Scan returns 55.
> On the other hand if I make the first hfile, the one with values 55 and 66 
> bigger in size than second hfile, then:
> Get returns 55  where as Scan returns 55.
> This can be seen in table 't2'.
> Weird things:
> 1. Get consistently returns values from larger hfile.
> 2. Scan consistently returns 55.
> Reason:
> Explanation 1: We add StoreFileScanners to heap by iterating over list of 
> store files which is kept sorted in DefaultStoreFileManger using 
> StoreFile.Comparators.SEQ_ID. It sorts the file first by increasing seq id, 
> then by decreasing filesize. So our larger files sizes are always in the 
> start.
> Explanation 2: In KeyValueHeap.next(), if both current and this.heap.peek() 
> scanners (type is StoreFileScanner in this case) point to KVs which compare 
> as equal, we put back the current scanner into heap, and call pollRealKV() to 
> get new one. While inserting, KVScannerComparator is used which compares the 
> two (one already in heap and the one being inserted) as equal and inserts it 
> after the existing one. \[1\]
> Say s1 is scanner over first hfile and s2 over second.
> 1. We scan with s2 to get values 1, 2, 3, 4
> 2. see that both scanners have c:5 as next key, put current scanner s2 back 
> in heap, take s1 out
> 4. return 55, advance s1 to key c:6
> 5. compare c:6 to c:5, put back s2 in heap since it has larger key, take out 
> s1
> 6. ignore it's value (there is code for that too), advance s2 to c:6
> Go back to step 2 with both scanners having c:6 as next key
> This is wrong because if we add a key between c:4 and c:5 to first hfile, say 
> (c:44, foo)  which makes s1 as the 'current' scanner when we hit step 2, then 
> we'll get the values - 1, 2, 3, 4, foo, 5, 6.
> (try table t3)
> Fix:
> Assign priority ids to StoreFileScanners when inserting them into heap, 
> latest hfiles get higher priority, and use them in KVComparator instead of 
> just seq id.
> \[1\] 
> [PriorityQueue.siftUp()|http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/PriorityQueue.java#586]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to