[
https://issues.apache.org/jira/browse/HTRACE-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295613#comment-15295613
]
Nisala Mendis commented on HTRACE-363:
--------------------------------------
Hi Colin,
I agree with your concerns. However ever when I debug the code it always goes
through this lines,
{code}
private TraceScope newScopeImpl(ThreadContext context, String description,
TraceScope parentScope, SpanId secondParentId) {
SpanId parentId = parentScope.getSpan().getSpanId();
Span span = new MilliSpan.Builder().
tracerId(tracerId).
begin(System.currentTimeMillis()).
description(description).
parents(new SpanId[] { parentId, secondParentId }).
spanId(parentId.newChildId()).
build();
return context.pushNewScope(this, span, parentScope);
}
{code}
At least in this case, there is a order which ID s of parents get assigned.
Also note the one parent ID is randomly generated. How do I handle this by
sorting for guaranteed order between parents?
Regards
Nisala
> Add tests for newScope with parent id
> -------------------------------------
>
> Key: HTRACE-363
> URL: https://issues.apache.org/jira/browse/HTRACE-363
> Project: HTrace
> Issue Type: Test
> Components: core
> Reporter: Mike Drob
>
> We should add some tests to verify that when there is a currently active
> scope and `newScope` is called with a valid parent id that both are included
> in the child span. The current code does this correctly, I think, but we
> should have tests to prevent accidental regressions in the future.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)