[
https://issues.apache.org/jira/browse/HBASE-17887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15990652#comment-15990652
]
Chia-Ping Tsai commented on HBASE-17887:
----------------------------------------
There is another error happened in 2.0. If the CompactingMemStore is enabled,
it will push the active to pipeline for snapshot.
{code}
private void pushActiveToPipeline(MutableSegment active) {
if (!active.isEmpty()) {
pipeline.pushHead(active);
resetActive();
}
}
{code}
The following code is used to create scanner.
{code}
public List<KeyValueScanner> getScanners(long readPt) throws IOException {
List<? extends Segment> pipelineList = pipeline.getSegments();
List<? extends Segment> snapshotList = snapshot.getAllSegments();
long order = 1 + pipelineList.size() + snapshotList.size();
// The list of elements in pipeline + the active element + the snapshot
segment
// The order is the Segment ordinal
List<KeyValueScanner> list = new ArrayList<KeyValueScanner>((int) order);
order = addToScanners(active, readPt, order, list);
order = addToScanners(pipelineList, readPt, order, list);
addToScanners(snapshotList, readPt, order, list);
return list;
}
{code}
We will lose the latest segment when creating the scanner with the following
execution order.
# List<? extends Segment> pipelineList = pipeline.getSegments(); // getScanners
# pipeline.pushHead(active); // pushActiveToPipeline
# resetActive(); // pushActiveToPipeline
# order = addToScanners(active, readPt, order, list); // getScanners
Therefore, we should cache the active before getting the segments from
pipeline. The side-effect is that we will have duplicate in-memory scanner but
it should be tolerated for ACID (and the cost is cheap).
> TestAcidGuarantees fails frequently
> -----------------------------------
>
> Key: HBASE-17887
> URL: https://issues.apache.org/jira/browse/HBASE-17887
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 2.0.0
> Reporter: Umesh Agashe
> Priority: Blocker
> Attachments: HBASE-17887.branch-1.v0.patch,
> HBASE-17887.branch-1.v1.patch, HBASE-17887.branch-1.v1.patch
>
>
> As per the flaky tests dashboard here:
> https://builds.apache.org/job/HBASE-Find-Flaky-Tests/lastSuccessfulBuild/artifact/dashboard.html,
> It fails 30% of the time.
> While working on HBASE-17863, a few verification builds on patch failed due
> to TestAcidGuarantees didn't pass. IMHO, the changes for HBASE-17863 are
> unlikely to affect get/ put path.
> I ran the test with and without the patch several times locally and found
> that TestAcidGuarantees fails without the patch similar number of times.
> Opening blocker, considering acid guarantees are critical to HBase.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)