[
https://issues.apache.org/jira/browse/HBASE-12931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294116#comment-14294116
]
Lars Hofhansl commented on HBASE-12931:
---------------------------------------
It's possible I made a mistake in HBASE-4583 and there's an off-by-one error.
Can change it and see whether all tests still pass.
This is only used in Increments and Appends.
> The existing KeyValues in memstroe are not removed completely after inserting
> cell into memStore
> -------------------------------------------------------------------------------------------------
>
> Key: HBASE-12931
> URL: https://issues.apache.org/jira/browse/HBASE-12931
> Project: HBase
> Issue Type: Bug
> Reporter: ChiaPing Tsai
> Priority: Minor
>
> If I'm not wrong, the UPSERT method of memStore should remove all existing
> KeyValues except the newer version.
> In memStore,
> {code:title=DefaultMemStore.java|borderStyle=solid}
> int versIionsVisible = 0;
> ...
> if (cur.getTypeByte() == KeyValue.Type.Put.getCode() &&
> cur.getSequenceId() <= readpoint) {
> if (versionsVisible > 1) {
> // if we get here we have seen at least one version visible to
> the oldest scanner,
> // which means we can prove that no scanner will see this version
> // false means there was a change, so give us the size.
> long delta = heapSizeChange(cur, true);
> addedSize -= delta;
> this.size.addAndGet(-delta);
> it.remove();
> setOldestEditTimeToNow();
> } else {
> versionsVisible++;
> }
> {code}
> Does "versionsVisible > 1" should be changed to "versionsVisible >= 1" ?
> thanks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)