rajeshkumarchandolu opened a new pull request, #12145: URL: https://github.com/apache/ozone/pull/12145
<h2 data-line="0" class="code-line" dir="auto" id="what-changes-are-proposed-in-this-pull-request" style="margin-top: 24px; font-weight: 600; margin-bottom: 16px; line-height: 1.25; font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">What changes are proposed in this pull request?</h2><p data-line="2" clas s="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">An SCM request shows up in a trace as one server span, so the time spent in SCM Ratis and in pipeline creation is invisible, and a failed block allocation does not say why it failed. This PR adds OpenTelemetry coverage for SCM on top of the tracing helpers merged in HDDS-17581 (#11852). It is part of the tracing epic HDDS-13679. The OM, datanode, client and Freon changes are in separate PRs.</p><p data-line="7" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">This PR replaces #11993. That PR wrapped SCM interfaces in tracing proxies. Review feedback pointed out that every SCM RPC entry point already gets a SERVER span from<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">OzoneProtocolMessageDispatcher</code><span> </span>(named after the command, for example<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">AllocateScmBlock</code>), so the proxies only added a duplicate child span. This version has no proxies and adds spans only where there is work that the entry span does not show.</p><p data-line="12" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing : normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong>Spans (service<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">StorageContainerManager</code>)</strong></p> Area | Span | How -- | -- | -- RPC entry points | <CmdType>, for example AllocateScmBlock | existing span from OzoneProtocolMessageDispatcher, unchanged SCM Ratis submit | SCMRatisServerImpl.submit.<operation>, for example SCMRatisServerImpl.submit.addContainer | span in SCMRatisServerImpl#submitRequest SCM Ratis apply | SCMStateMachine.applyTransaction | continues the trace of the request that submitted it, on every SCM Pipelines | PipelineManagerImpl.createPipeline | span in PipelineManagerImpl#createPipeline <p data-line="28" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Requests that fail with an exception (for example the container location protocol) are already marked as failed by the dispatcher, so they are not changed.</p><p data-line="31" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Seg oe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong>How the trace follows a Ratis request.</strong><span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">SCMRatisRequestProto</code><span> </span>gets an optional<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">traceID</code><span> </span>(field 3). It is set when the request is encoded inside the<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">SCMRatisServerImpl.submit.<operation></code><span> </span>span, so<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">SCMStateMachine.applyTransaction</code><span> </span>on each SCM becomes a child of it. The field is optional and additive: log entries written without it decode with an empty<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color : rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">traceID</code><span> </span>and no span is created for them. No<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">startTransaction</code><span> </span>span is added, it would not show any work.</p><p data-line="36" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-tex t-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Handling of spans created on threads without a parent trace (for example the background pipeline creator) is not part of this PR.</p><h2 data-line="39" class="code-line" dir="auto" id="what-is-the-link-to-the-apache-jira" style="margin-top: 24px; font-weight: 600; margin-bottom: 16px; line-height: 1.25; font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">What is the link to the Apache JIRA</h2><p data-line="41" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a href="https://issues.apache.org/jira/browse/HDDS-17593" data-href="https://issues.apache.org/jira/brows e/HDDS-17593" style="color: rgb(0, 105, 204); text-decoration: none;">https://issues.apache.org/jira/browse/HDDS-17593</a></p><h2 data-line="43" class="code-line" dir="auto" id="how-was-this-patch-tested" style="margin-top: 24px; font-weight: 600; margin-bottom: 16px; line-height: 1.25; font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid rgba(0, 0, 0, 0.18); border-top-color: rgba(0, 0, 0, 0.18); border-right-color: rgba(0, 0, 0, 0.18); border-left-color: rgba(0, 0, 0, 0.18); color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; te xt-decoration-color: initial;">How was this patch tested?</h2><ul data-line="45" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 0.7em; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li data-line="45" class="code-line" dir="auto"><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">mvn clea n install -DskipTests -DskipShade -DskipRecon</code>, including the dependency analysis: BUILD SUCCESS</li><li data-line="46" class="code-line" dir="auto">Unit tests with<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSpanCollector</code><span> </span>assertions, 167 tests in 14 classes pass:<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestTracingUtil</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestAuditMessageTracing</cod e>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestOzoneAuditLogger</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestOzoneProtocolMessageDispatcher</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestScmBlockLocationProtocolServerSideTranslatorPB</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3p x; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestStorageContainerLocationProtocolServerSideTranslatorPB</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSCMSecurityProtocolServerSideTranslatorPB</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSecretKeyProtocolServerSideTranslatorPB</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSCMBlockProtocolServer</code>,<span> </span><code style="font-fa mily: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSCMRatisRequest</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSCMStateMachine</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSCMRatisServerImpl</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestSCMHAManagerImpl </code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">TestPipelineManagerImpl</code></li><li data-line="52" class="code-line" dir="auto">Removing each change makes its test fail (checked by hand for the Ratis trace encode and decode, the child span rule of<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">applyTransaction</code>, and the recorded exception)</li><li data-line="54" class="code-line" dir="auto"><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">c heckstyle:check</code><span> </span>on<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">hdds-common</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">hdds-server-framework</code><span> </span>and<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">hdds-server-scm</code>: 0 violations.<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); paddi ng: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">apache-rat:check</code><span> </span>on the same modules: 0 unapproved files</li><li data-line="56" class="code-line" dir="auto">Manual check in Jaeger on a docker compose cluster built from this branch (<code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">compose/ozone</code><span> </span>with<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">monitoring.yaml</code>, 1 SCM, 1 OM, 3 datanodes). Click an image to open it at full size.</li></ul><p data-line="59" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -ap ple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong>1.<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">ozone sh key put</code>: the whole write path in one trace (39 spans, 6 services)</strong></p><pre style="margin-top: 0px; position: relative; background-color: rgb(236, 236, 236); border: 0.833333px solid rgb(226, 226, 229); p adding: 16px; border-radius: 3px; overflow: auto; white-space: pre-wrap; color: rgb(32, 32, 32); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><code data-line="61" class="code-line" dir="auto" style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(32, 32, 32); background: none; padding: 0px; border-radius: 4px; font-size: 1em; line-height: 1.357em; display: inline-block; tab-size: 4;">$ ozone sh volume create /vol1 $ ozone sh bucket create /vol1/bucket1 $ ozone sh key put /vol1/bucket1/key1 /tmp/key1.txt $ ozone sh key info /vol1/bucket1/key1 "name" : "key1", "dataSize" : 14, "replicationConfig" : { "requiredNodes" : 3, "replicationType" : "RATIS" </code><button class="code-block-copy-button" aria-label="Copy code block" style="position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0px; border: 0.833333px solid rgb(226, 226, 229); border-radius: 4px; background-color: rgb(236, 236, 236); color: rgb(32, 32, 32); cursor: pointer; opacity: 0; transition: opacity 0.15s;"><svg aria-hidden="true" focusable="false" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 4H2V14H11V12H4V4Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M5 2H14V11H5V2ZM6 3H13V10H6V3Z" fill="currentColor"></path></svg></button></pre><p data-line="73" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: norma l; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a href="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/1-key-put-trace-overview.png" data-href="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/1-key-put-trace-overview.png" style="color: rgb(0, 105, 204); text-decoration: none;"><img src="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/1-key-put-trace-overview.png" alt="ozone sh key put trace" data-src="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/1-key-put-trace-overview.png" id="image-0" data-vscode-context="{"webviewSection":&qu ot;image","id":"image-0","preventDefaultContextMenuItems":true,"resource":"file:///Users/rajesh.chandolu/Documents/github-repositories/rchandol-private-repositories/rchandol-ozone/tracing-pr-evidence/scm-HDDS-17593-v2/pr-description.md","imageSource":"https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/1-key-put-trace-overview.png"}" style="max-width: 100%; max-height: 100%;"></a></p><p data-line="75" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong>2. The SCM part of that trace, with the audit params on<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">AllocateScmBlock</code></strong></p><p data-line="77" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webk it-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">AllocateScmBlock</code><span> </span>has the audit params as attributes (<code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">allocated=1</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">num=1</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New&qu ot;, monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">owner</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">replication=RATIS/THREE</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">size</code>,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">sampleBlocks</code>). Under it, each<span> </span><code style="font-family: Menlo, Monac o, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">SCMRatisServerImpl.submit.<operation></code><span> </span>span has a<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">SCMStateMachine.applyTransaction</code><span> </span>child.</p><p data-line="81" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent : 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a href="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/2-key-put-scm-spans-and-audit-attributes.png" data-href="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/2-key-put-scm-spans-and-audit-attributes.png" style="color: rgb(0, 105, 204); text-decoration: none;"><img src="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/2-key-put-scm-spans-and-audit-attributes.png" alt="SCM spans and audit attributes" data-src="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/2-key-put-scm-spans-and-audit-attributes.png" id="image-1" data-vscode-context="{"webviewSection":"image","id":"image-1","preventDefaultCont extMenuItems":true,"resource":"file:///Users/rajesh.chandolu/Documents/github-repositories/rchandol-private-repositories/rchandol-ozone/tracing-pr-evidence/scm-HDDS-17593-v2/pr-description.md","imageSource":"https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/2-key-put-scm-spans-and-audit-attributes.png"}" style="max-width: 100%; max-height: 100%;"></a></p><p data-line="83" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text -decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><strong>3. A failed allocation: an erasure coded key needs 5 datanodes and the cluster has 3</strong></p><pre style="margin-top: 0px; position: relative; background-color: rgb(236, 236, 236); border: 0.833333px solid rgb(226, 226, 229); padding: 16px; border-radius: 3px; overflow: auto; white-space: pre-wrap; color: rgb(32, 32, 32); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><code data-line="85" class="code-line" dir="auto" style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(32, 32, 32); background: none; padding: 0px; border-radius: 4 px; font-size: 1em; line-height: 1.357em; display: inline-block; tab-size: 4;">$ ozone sh key put -t EC -r rs-3-2-1024k /vol1/bucket1/keyEC /tmp/key1.txt INTERNAL_ERROR Not enough datanodes to choose. TotalNodes = 3 AvailableNodes = 3 RequiredNodes = 5 ExcludedNodes = 0 UsedNodes = 0 </code><button class="code-block-copy-button" aria-label="Copy code block" style="position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0px; border: 0.833333px solid rgb(226, 226, 229); border-radius: 4px; background-color: rgb(236, 236, 236); color: rgb(32, 32, 32); cursor: pointer; opacity: 0; transition: opacity 0.15s;"><svg aria-hidden="true" focusable="false" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 4H2V14H11V12H4V4Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M5 2H14V11H5V2ZM6 3H13V10H6V3Z" fill="currentColor"></path></svg></button></pre><p data-line="90" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: norma l; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">AllocateScmBlock</code><span> </span>has status ERROR,<span> </span><code style="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">ozone.status=FAILED_TO_FIND_SUITABLE_NODE</code>, the audit params, and the exception as a span event. Its two<span> </span><code sty le="font-family: Menlo, Monaco, "Courier New", monospace; color: rgb(59, 59, 59); background-color: rgba(0, 0, 0, 0.12); padding: 1px 3px; border-radius: 4px; font-size: 1em; line-height: 1.357em;">PipelineManagerImpl.createPipeline</code><span> </span>children are marked as failed too.</p><p data-line="93" class="code-line" dir="auto" style="margin-top: 0px; margin-bottom: 16px; color: rgb(32, 32, 32); font-family: -apple-system, "system-ui", "Segoe WPC", "Segoe UI", system-ui, Ubuntu, "Droid Sans", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a href="https://raw.githubusercont ent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/3-ec-key-put-failed-allocation.png" data-href="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/3-ec-key-put-failed-allocation.png" style="color: rgb(0, 105, 204); text-decoration: none;"><img src="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/3-ec-key-put-failed-allocation.png" alt="failed allocation" data-src="https://raw.githubusercontent.com/rajeshkumarchandolu/ozone/tracing-proofs/scm-v2/3-ec-key-put-failed-allocation.png" id="image-2" data-vscode-context="{"webviewSection":"image","id":"image-2","preventDefaultContextMenuItems":true,"resource":"file:///Users/rajesh.chandolu/Documents/github-repositories/rchandol-private-repositories/rchandol-ozone/tracing-pr-evidence/scm-HDDS-17593-v2/pr-description.md","imageSource":"https://raw.githubusercontent.com/rajeshkumarchandolu /ozone/tracing-proofs/scm-v2/3-ec-key-put-failed-allocation.png"}" style="max-width: 100%; max-height: 100%;"></a></p> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
