b b3-propagation协议

Affinity Propagation: AP聚类算法 算法概述原文: 阅读详情

–> go to 总目录
讲述了 zipkin的x


https://raw.githubusercontent.com/openzipkin/b3-propagation/master/README.md

b3-propagation

B3 Propagation is a specification for the header “b3” and those that start with “x-b3-”. These headers are used for trace context propagation across service boundaries.

B3propagation是一堆拥有"x-b3-"前缀的header

Overview

This specification elaborates identifiers used to place an operation in a trace tree. These attributes are propagated in-process, and eventually downstream (often via http headers), to ensure all activity originating from the same root are collected together. A sampling decision is made at the root of the trace, and this indicates if trace details should be collected and reported to the tracing system (usually Zipkin) or not.

规范清晰身份ID通常被放置在trace树的一个操作中。这些属性以in-process的方式传递并且最终顺流而下以确保所有活动(从一个root产生的)能被同时收集。一个采集的决定也是root节点就确认好的,这个策略也指明这个trace是否被收集和发送到追踪系统中去(通常是zipkin)

Overall Process

总体流程

The most common propagation use case is to copy a trace context from a client
sending an RPC request to a server receiving it.

In this case, the same trace IDs are used, which means that both the client and
server side of an operation end up in the same node in the trace tree.

Here’s an example flow using multiple header encoding, assuming an HTTP request carries the propagated trace:

最常见的传递示例是,当一个cliect 发送 RPC request时 将context 发送给一个Server
如下示例中,同样的traceIDs被使用,这意味着一个operation的client和server最终会显示成trace树的一个节点

   Client Tracer                                                  Server Tracer     
┌───────────────────────┐                                       ┌───────────────────────┐
│                       │                                       │                       │
│   TraceContext        │          Http Request Headers         │   TraceContext        │
│ ┌───────────────────┐ │         ┌───────────────────┐         │ ┌───────────────────┐ │
│ │ TraceId           │ │         │ X-B3-TraceId      │         │ │ TraceId           │ │
│ │                   │ │         │                   │         │ │                   │ │
│ │ ParentSpanId      │ │ Inject  │ X-B3-ParentSpanId │ Extract │ │ ParentSpanId      │ │
│ │                   ├─┼────────>│                   ├─────-───┼>│                   │ │
│ │ SpanId            │ │         │ X-B3-SpanId       │         │ │ SpanId            │ │
│ │                   │ │         │                   │         │ │                   │ │
│ │ Sampling decision │ │         │ X-B3-Sampled      │         │ │ Sampling decision │ │
│ └───────────────────┘ │         └───────────────────┘         │ └───────────────────┘ │
│                       │                                       │                       │
└───────────────────────┘                                       └───────────────────────┘

Trace identifiers are often sent with a sampling decision. However, it is valid and common practice to send a sampling decision independently. Here’s an example of a proxy forbidding tracing of a /health endpoint. The diagram shows the receiver making a NoOp trace context to ensure minimal overhead.

trace 身份标识通常会携带一个采样策略。然而合法且通用的是独立的去发送这个策略。以下是一个举例:一个代理端禁止/health
端。这个图表显示receiver创造了一个NoOP context(假contet)区保证最小化数据。

                                Server Tracer     
                              ┌───────────────────────┐
 Health check request         │                       │
┌───────────────────┐         │   TraceContext        │
│ GET /health       │ Extract │ ┌───────────────────┐ │
│ X-B3-Sampled: 0   ├─────────┼>│ NoOp              │ │
└───────────────────┘         │ └───────────────────┘ │
                              └───────────────────────┘

Identifiers

Trace identifiers are 64 or 128-bit, but all span identifiers within a trace are 64-bit. All identifiers are opaque.

Identifiers are almost always sent with Sampling state, but they can be sent alone to implement a “Defer” decision described below.

trace的身份证是64或128,但是trace内span的id都在64位以内。
身份Id 通常会有采样状态。但是他们可以独立的实现一个"defer"策略(如下描述)

TraceId

The TraceId is 64 or 128-bit in length and indicates the overall ID of the trace. Every span in a trace shares this ID.

traceId是总Id,每个span都有

SpanId

The SpanId is 64-bit in length and indicates the position of the current operation in the trace tree. The value should not be interpreted: it may or may not be derived from the value of the TraceId.

spanId可以指示在trace中的位置。跟traceId关系不大

ParentSpanId

The ParentSpanId is 64-bit in length and indicates the position of the parent operation in the trace tree. When the span is the root of the trace tree, there is no ParentSpanId.

Sampling State 重点

Sampling is a mechanism to reduce the volume of data that ends up in the tracing system. In B3, sampling applies consistently per-trace: once the sampling decision is made, the same value should be consistently sent downstream. This means you will see all spans sharing a trace ID or none.

采样是一个减少数据量组件。b3中每条trace都有这个标记:一旦这个策略被设定,就会顺延到整个链路中去。这意味着所有span要么有traceId,要么都没有。

Here are the valid sampling states. Note they all applied to the trace ID, not the span ID:

  • Defer: aka I don’t know yet!
    • Defer is used when trace identifiers are set by a proxy, but that proxy doesn’t send data to Zipkin. The most common use case for defering a decision is pre-provisioning trace identifiers.
    • In all known encodings, defer is the absence of sampling state.
  • Deny: aka don’t sample or don’t record
    • Deny is used to achieve a probabilistic rate or to prevent certain paths (such as health checks) from generating traces. Where possible, instrumentation should should optimize deny such that less overhead occurs.
  • Accept: aka sample or record
    • Accept is used to achieve a probabilistic rate or to ensure certain paths (such as low-traffic endpoints) are always traced. When a trace is accepted, spans should be reported to zipkin except in overload scenarios.
  • Debug: aka force trace
    • Debug is a production troubleshooting aid used in tools like curl or chrome debug. Debug is an emphasized accept decision that implies accept, additionally reporting Span.debug = true for each span in the trace.

以下是合法的四种状态。都应用于traceId,而不是span ID:

  • Defer 状态异常。比如设置了traceId,但是proxy没发送,标记为Defer。这是sampling状态缺失的标记
  • Deny 拒绝 。调整速率,或者过滤某些path(如健康监察),这种标记instrumentation应该尽可能少的往header塞入值
  • accept 接受。 调整速率,或确保某些具体的paths被追踪到。
  • debug 强制接受。用来调测

The most common use of sampling is probablistic: eg, accept 0.01% of traces and deny the rest. Debug is the least common use case.

最常用的采样标识是:accept 0.01%和拒绝rest。debug是最少用的
Sampling state is almost always sent with Identifiers, but it can be sent alone (a predefined decision). This is used for a few use cases:

  • Deny: Using a constant entry for a deny decision is more efficient than generating identifiers. Libraries that do this cannot do external ID correlation, though, for example, log correlation.
  • Accept: Some proxies send a constant entry for an accept decision as they want a specific path to be traced, but don’t want to interfere with ID generation.
  • Debug: Some support guides send debug without IDs as it is easier to do in curl.

Encodings

Below are a number of predefined encodings. The oldest encoding is multiple HTTP headers (2012). Some application notes have been made since, as well a compact, single-header encoding. A binary encoding may be defined as well.

Most users do not need to know the encodings listed here as they are built-in to libraries, frameworks and proxies. While this specification aims to be complete, it will not elaborate all use cases and practice. Please contact the Zipkin gitter if you are confused about something.

id的编码规则,不需要了解很细

Custom Encodings

We recommend re-using existing encodings over developing new ones as there are usually subtleties that even experienced folks overlook. For example, one proxy accidentally chose to use a hyphen to substitute for an absent parent span ID. This caused broken traces, and in some extreme cases, crashed requests. Some types of software have multiple month or longer release cycles, which adds tension to add “spaghetti” to clean it up. Identifying and answering questions about such problems add support load unfairly to others as they weren’t consulted. Even ruling out format mismatches, misunderstanding of the feature set can cause expensive maintenance later.

The best way to avoid costly mistakes is to re-use an encoding. The second-best way is reading this spec completely when designing a bespoke encoding, and getting feedback from the authors on your work. If you are designing a new encoding, please contact the Zipkin gitter so that you have the best chance to avoid mistakes others made in the past.

避免自造,重用编码

Http Encodings

There are two encodings of B3: Single Header and Multiple Header. Multiple header encoding uses an X-B3- prefixed header per item in the trace context. Single header delimits the context into into a single entry named b3. The single-header variant takes precedence over the multiple header one when extracting fields.

http 编解码,分为single Header: b3;Multiple Header ‘X-B3-’。single优先于Multiple

Multiple Headers

B3 attributes are most commonly propagated as multiple http headers. All B3 headers follows the convention of X-B3-${name} with special-casing for flags. When extracting state headers, the first value wins.

Note: Http headers are case-insensitive, but sometimes this encoding is used for other transports. When encoding in case-sensitive transports, prefer lowercase keys or the single header header encoding which is explicitly lowercase.

As mentioned earlier, identifiers can be sent with or without sampling state and visa versa. It is important to understand the relationships between these headers. For example, X-B3-TraceId and X-B3-SpanId can be sent alone, or with a sampling header X-B3-Sampled. It is also valid to send sampling state independently, such as a deny decision X-B3-Sampled: 0.

复合headers。注意X-B3-Sampled: 0可以独立发送,其余不能被解析

TraceId

The X-B3-TraceId header is encoded as 32 or 16 lower-hex characters. For example, a 128-bit TraceId header might look like: X-B3-TraceId: 463ac35c9f6413ad48485a3953bb6124. Unless propagating only the Sampling State, the X-B3-TraceId header is required.

SpanId

The X-B3-SpanId header is encoded as 16 lower-hex characters. For example, a SpanId header might look like: X-B3-SpanId: a2fb4a1d1a96d312. Unless propagating only the Sampling State, the X-B3-SpanId header is required.

ParentSpanId

The X-B3-ParentSpanId header may be present on a child span and must be absent on the root span. It is encoded as 16 lower-hex characters. For example, a ParentSpanId header might look like: X-B3-ParentSpanId: 0020000000000001

Sampling State

An accept sampling decision is encoded as X-B3-Sampled: 1 and a deny as X-B3-Sampled: 0. Absent means defer the decision to the receiver of this header. For example, a Sampled header might look like: X-B3-Sampled: 1.

Note: Before this specification was written, some tracers propagated X-B3-Sampled as true or false as opposed to 1 or 0. While you shouldn’t encode X-B3-Sampled as true or false, a lenient implementation may accept them.

Debug Flag

Debug is encoded as X-B3-Flags: 1. Debug implies an accept decision, so don’t also send the X-B3-Sampled header.

Single Header

A single header named b3 standardized in late 2018 for use in JMS and w3c tracestate. Design and rationale are captured here. Check or update our status page for adoption status.

In simplest terms b3 maps propagation fields into a hyphen delimited string.

b3={TraceId}-{SpanId}-{SamplingState}-{ParentSpanId}, where the last two fields are optional.

For example, the following state encoded in multiple headers:

X-B3-TraceId: 80f198ee56343ba864fe8b2a57d3eff7
X-B3-ParentSpanId: 05e3ac9a4f6e3b90
X-B3-SpanId: e457b5a2e4d86bd1
X-B3-Sampled: 1

Becomes one b3 header, for example:

b3: 80f198ee56343ba864fe8b2a57d3eff7-e457b5a2e4d86bd1-1-05e3ac9a4f6e3b90

Note: When only propagating a sampling decision, the header is still named b3, but only contains the sampling state.

A deny decision encodes as:

b3: 0

TraceId

The first position of the b3 value is the 32 or 16 lower-hex character TraceId. Unless propagating
only the Sampling State, the TraceId is required.

For example, a TraceId of 80f198ee56343ba864fe8b2a57d3eff7 encodes in the left-most position:

b3: 80f198ee56343ba864fe8b2a57d3eff7-e457b5a2e4d86bd1-1

SpanId

The second position of the b3 value is the 16 lower-hex character SpanId. Unless propagating only
the Sampling State, the SpanId is required.

For example, a SpanId of e457b5a2e4d86bd1 encodes after the left-most hyphen:

b3: 80f198ee56343ba864fe8b2a57d3eff7-e457b5a2e4d86bd1-1

Sampling State

When the sampling state isn’t Defer, it is encoded as a single hex character in the third position
of the b3 value. Sampling state can also be sent on its own (with no identifiers).

Sampling State is encoded as a single hex character for all states except Defer. Defer is absence of
the sampling field.

  • Accept: 1
  • Deny: 0
  • Debug: d

For example, a debug trace could look like this

b3: 80f198ee56343ba864fe8b2a57d3eff7-e457b5a2e4d86bd1-d

A deny decision may omit identifiers and look like this:

b3: 0

ParentSpanId

When present, ParentSpanId is the 16 lower-hex characters in the final position of b3.

For example, a ParentSpanId of 05e3ac9a4f6e3b90 encodes in the right-most position:

b3: 80f198ee56343ba864fe8b2a57d3eff7-e457b5a2e4d86bd1-1-05e3ac9a4f6e3b90

gRPC Encoding

B3 attributes can also be propagated as ASCII headers in the Custom Metadata of
a request. The encoding is exactly the same as Http headers, except the names are
explicitly or implicitly down-cased.

For example, when using multiple headers, X-B3-ParentSpanId: 0020000000000001 encodes
as an ASCII header x-b3-parentspanid with the same value.

JMS Encoding

JMS (Java Message Service) has constraints that disallow X-B3- prefixed headers.
As such, only the single header format b3 should be used with JMS. As messaging spans
never share a SpanId, it is encouraged to omit the ParentSpanId field when propagating.

Refer to our design
documentation for details.

Frequently Asked Questions 重点

常见问题

Why is ParentSpanId propagated?

In B3, the trace context is extracted from incoming headers. Timing and
metadata for the client and server side of an operation are recorded with
the same context. The ParentSpanId is the ID of the operation that caused
the current RPC. For example, it could be the ID of another server request
or a scheduled job. ParentSpanId is propagated so that when data is reported
to Zipkin, it can be placed in the correct spot in the trace tree.

Here’s an example of a B3 library extracting a trace context from incoming http
request headers:

                           ┌───────────────────┐
 Incoming Headers          │   TraceContext    │
┌───────────────────┐      │ ┌───────────────┐ │
│ X-B3-TraceId      │──────┼─┼> TraceId      │ │
│                   │      │ │               │ │
│ X-B3-ParentSpanId │──────┼─┼> ParentSpanId │ │
│                   │      │ │               │ │
│ X-B3-SpanId       │──────┼─┼> SpanId       │ │
│                   │      │ └───────────────┘ │
└───────────────────┘      └───────────────────┘

Some propagation formats look similar to B3, but don’t propagate a field named
parent. Instead, they propagate a span ID field which serves the same purpose
as ParentSpanId. Unlike B3, these systems use a different span ID for the
client and server side of an RPC. When a server reads headers like this, it is
expected to provision a new span ID for itself, and use the one it extracted as
its parent.

Here’s an example of an alternate library composing a trace context with
incoming http request headers and an ID generator:

                           ┌───────────────────┐
 Incoming Headers          │   TraceContext    │
┌───────────────────┐      │ ┌───────────────┐ │
│ XXXX-TraceId      │──────┼─┼> TraceId      │ │
│                   │      │ │               │ │
│ XXXX-SpanId       │──────┼─┼> ParentSpanId │ │
└───────────────────┘      │ │               │ │      ┌──────────────┐
                           │ │  SpanId      <┼─┼──────│ ID Generator │
                           │ └───────────────┘ │      └──────────────┘
                           └───────────────────┘

In both B3 and the above example, incoming headers contain the parent’s span ID,
and three IDs (trace, parent, span) end up in the trace context. The difference
is that B3 uses the same span ID for the client and server side of an RPC, where
the latter does not.

Why propagate a reject sampling decision?

It may not be obvious why you’d send a reject sampling decision to the next hop.
Imagine a service decides not to trace an operation and makes 2 out-going calls,
and these branched out further. If reject (“don’t trace”) isn’t propagated, the
system might receive only parts of the operation, confusing users.

Another reason to reject sampling is to prevent overwhelming the collector with
high throughput. If the reject-sampling decision is not propagated then there’s
no way to tell recipients of outbound calls that they should not send span info
to the collector.

Why send trace IDs with a reject sampling decision?

While valid to propagate only a reject sampling decision (X-B3-Sampled: 0),
if trace identifiers are established, they should be propagated, too. The
tracing system is often not the only consumer of trace identifiers. Services may
still want to do things with the tracing info even if they aren’t sending span
data to the collector, e.g. tag logs with trace IDs.

Why defer a sampling decision?

Deferring the sampling decision is special-case. The only known use-cases are
the following:

  • Debug trace: A debug trace is implicitly an accepted trace
  • Externally provisioned IDs: When you want to control IDs, but not sampling policy

Unless it is a debug trace, leaving out a sampling decision is typically ID
correlation. For example, someone re-uses a global identifier from another
system, or correlating in logs. In these cases, the caller knows the ID they
want, but allows the next hop to decide if it will be traced or not. The caller
should not report a span to the tracing system using this ID unless they
propagate an accept sampling decision.

Why is Debug encoded as X-B3-Flags: 1?

The first tracer to use B3 was Finagle. In Finagle, thrift-rpc was a dominant
protocol, and a fixed-width binary encoding held B3 attributes. This binary
encoding used a bit field to encode the sampling decision and the debug flag.

Http encoding chose to use a separate header for the sampling decision, but
kept the flags field for debug. In hind sight, it would have made more sense to
use a separate header such as X-B3-Debug: 1 as no other flags were added and
no implementation treats X-B3-Flags as a bit field. That said, renaming the
field would cause more damage than good, so it was left alone.

PointNet++上采样(Feature Propagation) PointNet++在处理分割任务的时候需要将下采样的点还原到与输入相同的点数,便于做每个点的预测。但是在论文中只给了一个简单的描述和公式,不是很好理解,因此在这里记录一下我的理解过程。 1.FP模块的目的 PointNet++会随着网络逐层降低采样的点数,这样来保证网络获得足够的全局信息,但是这样会导致无法完成分割任务,因为分割任务是一个端到端的,必须保证输出与输入点数相同。 一种完成分割任务的方法就是不下采样点,始终将所有点放入网络进行计算。但这样需要消耗大量计算成本。另一种比较常用的方法就是进行插值了 阅读详情

相关推荐

b3-propagation:描述甚至有时实现B3传播的存储库

b3传播 B3传播是针对标头“ b3”和以“ x-b3-”开头的标头的规范。 这些标头用于跨服务边界传播跟踪上下文。 概述 该规范详细说明了用于将操作放置在跟踪树中的标识符。 这些属性在过程中传播,并最终传播到下游(通常通过http标头),以确保将源自同一根的所有活动收集在一起。 在跟踪的根部做出抽样决定,这表明是否应收集跟踪详细信息并将其报告给跟踪系统(通常是Zipkin)。 整体流程 最常见的传播用例是将跟踪上下文从发送RPC请求的客户端复制到接收该请求的服务器。 在这种情况下,将使用相同的span ID,这意味着操作的客户端和服务器端都位于跟踪树中的同一节点中。 这是使用多个标头编码的示例流程,假设HTTP请求带有传播的跟踪: Client Tracer Server Trac

远程工作绩效考核终极指南:10个关键指标让团队高效运转

远程工作绩效考核是远程团队管理的核心挑战之一。在分布式工作环境中,如何科学评估员工表现、保持团队高效运转?本文将为你提供完整的远程工作绩效考核指南,包含10个关键指标和实用方法,帮助管理者建立公平透明的评估体系,让远程团队保持高效运转。🚀 ## 📊 为什么远程工作绩效考核如此重要? 传统的办公室考核模式在远程环境中往往失效。远程工作绩效考核需要新的思维和方法,它不仅是评估员工表现的依据,更

gitblog_00095的博客 573

【Cadence】 ADS Dynamic Link使用教程

在Cadence617上使用ADS Dynamic Link

乾巽的博客 6088

zipkin:自定义链路传播(四)

背景 zipkin链路信息 传播方式 ons、dubbo 通用传播工具

乐天派 1845

深入解析反射式DLL注入:从原理到实战优化

本文深入解析反射式DLL注入技术,从原理到实战优化全面剖析。通过PE文件内存重构、反射加载器实现及免杀增强方案,展示如何绕过安全检测并提升性能。适用于红队行动、内网渗透等场景,是高级攻防对抗中的关键技术。

weixin_28339967的博客 407

别再为镜面物体检测发愁了!手把手教你用PMD相位偏折术增强2.5D形状图细节(附Python代码)

本文详细解析了PMD相位偏折术在工业视觉中镜面物体检测的应用,通过2.5D成像方案增强形状图细节。文章提供了Python代码示例,介绍了一种计算高效的局部特征增强算法,帮助解决产线环境中的噪声问题,提升缺陷识别准确率。

weixin_29299807的博客 346

探索B3 Propagation:统一的链路跟踪解决方案

探索B3 Propagation:统一的链路跟踪解决方案 在分布式系统日益复杂的今天,理解服务间的调用关系和追踪性能瓶颈变得至关重要。B3 Propagation正是为了解决这一挑战而生,它提供了一套标准化方案,确保跨服务边界的跟踪上下文能够无缝传递。 项目介绍 B3 Propagation,由Zipkin社区推出,关注于如何高效地通过HTTP头(如“b3”以及以“x-b3-”前缀开头的头)传播跟...

gitblog_00181的博客 381

从ATE到ATPG:基于Scan Chain的芯片制造缺陷定位实战解析

本文深入解析了从ATE到ATPG的芯片制造缺陷定位实战技术,重点介绍了Scan Chain的工作原理、异步复位触发器处理技巧以及Design Compiler中的DFT实现方法。通过实际案例展示了如何利用ATE测试数据和ATPG工具进行精确的缺陷定位,并分享了提升测试覆盖率和优化测试成本的专业技巧,为芯片测试工程师提供了宝贵的实战经验。

weixin_42527160的博客 383

聊聊分布式链路追踪

原文链接:http://lidawn.github.io/2018/12/26/distribute-tracing/ 起因 最近一直在做分布式链路追踪的调研和实践,整理一下其中的知识点。 什么是链路追踪 分布式系统变得日趋复杂,越来越多的组件开始走向分布式化,如微服务、分布式数据库、分布式缓存等,使得后台服务构成了一种复杂的分布式网络。在服务能力提升的同时,复杂的网络结构也使问题定位更...

aoteman0001的博客 342

GPU核心性能指标

内存科普 CPU缓存分为三类,一级缓存(L1)、二级缓存(L2)和三级缓存(L3)。CPU在实际数据读取中重要的却是一级缓存,因为一级缓存速度最快,二级缓存其次,三级缓存最慢,只是三级缓存的容量最大。 DDR1,DDR2,DDR3内存条(DDR是Double Data Rate双倍速率同步动态随机存储器的英文缩写)就是俗称的一二三代内存条。这三种内存条工艺不同,接口不同,性能不同,互不兼容。要区分它们,也不难。内存条可以用在CPU内存或者GPU显存中。比如 the NVIDIA Tesla M2050 GP

Charles Ren's Tech Blog 2万+

端侧部署与优化:让 AI 真正走进现实生活的关键技术

AI 的开发流程分为 “训练” 与 “推理” 两大阶段。在训练阶段,科研人员依托云端海量数据和高性能 GPU 算力,构建出精度优异的 AI 模型 —— 比如能识别 1000 种物体的图像分类模型、能理解人类语言的自然语言处理模型。但这些在云端 “战绩斐然” 的模型,若直接应用到现实场景中,却会面临三大 “落地困境”。从云端到端侧,从模型压缩到硬件适配,端侧部署与优化技术解决了 AI 落地的核心难题,让 AI 不再是实验室里的 “高精尖技术”,而是融入日常生活的 “实用工具”。

m0_63477749的博客 1056

Golang开发 进阶

本文介绍了Golang中的协程管理和常用开发工具。在协程部分,重点讲解了通过WaitGroup、Channel和Mutex实现并发控制,并提供了协程池的实现方案。Golang协程创建成本低,适合高并发场景。在开发框架方面,详细介绍了Gin Web框架的特点和使用方法,包括路由、中间件等功能,并分析了其高性能原因在于基于httprouter的路由实现。还介绍了Zipkin分布式链路追踪系统的作用原理,以及如何解决微服务架构中的调用链追踪问题。

JK01WYX的博客 924

(2)NPW(监控片)【中】---业务场景精讲

自己在日常工作当中,由于非产线人员出生,对NPW的知识一直一知半解,业务场景认识的不够透彻,做系统的时候很难理解甲方的NPW业务应用,特收集了不少关于NPW的一些业务场景,下面都是一些摘抄,大家关注我标红标粗的部分,

阿拉伯梳子的专栏 1594

关于PROPAGATION_NESTED的理解

查了一些资料,感觉并不能很清晰地表达出两者的差异。所以打算自己总结一下。 先来看一下Spring中对于事务传播性的几种定义 PROPAGATION_REQUIRED -- 支持当前事务,如果当前没有事务,就新建一个事务。这是最常见的选择。 PROPAGATION_SUPPORTS -- 支持当前事务,如果当前没有事务,就以非事务方式执行。 PROPAGATION_MANDATORY -- 支...

yanxin1213的博客 2万+

银行业数据科学家的 6 条经验教训

原本希望在计算机科学、统计学和机器学习领域工作。运用新方法获得独特见解,实现一切自动化。简而言之,最终成了这个职业炒作的牺牲品。我想和你们分享一下。希望我们能够摆脱炒作,提高你对数据科学家工作的理解。

茶桁专栏 251

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

@Transactional中PROPAGATION_REQUIRES_NEW 和 PROPAGATION_NESTED区别

@Transactional1、Spring中对于事务传播性的定义2、PROPAGATION_REQUIRES_NEW 与 PROPAGATION_NESTED区别3、@Transactional主方法调用子方法事务的有无3.1 两个方法在同一个类中3.2 两个方法在不同类中 1、Spring中对于事务传播性的定义 PROPAGATION_REQUIRED:支持当前事务,如果当前没有事务,则新建一个事务 PROPAGATION_SUPPORTS:支持当前事务,如果当前没有事务,则以非事务进行 PROPAG

LuQiaoYa的博客 3266

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

关于@Transactional PROPAGATION的理解

先来看一下Spring中对于事务传播性的几种定义 PROPAGATION_REQUIRED -- 支持当前事务,如果当前没有事务,就新建一个事务。这是最常见的选择。 PROPAGATION_SUPPORTS -- 支持当前事务,如果当前没有事务,就以非事务方式执行。 PROPAGATION_MANDATORY -- 支持当前事务,如果当前没有事务,就抛出异常。 PROPAGATION_REQUIRES_NEW -- 新建事务,如果当前存在事务,把当前事务挂起。 PROPAGATION_NOT_SUPPO

心有猛虎,是只大喵的博客 1017

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

@Transactional(propagation = Propagation.REQUIRES_NEW)

请先看如下代码: @Transactional public CommonReturnType funA() { //... funB(); // 调用函数B //... func(); // 调用函数C //... } @Transactional(propagation = Propagation.REQUIRES_NEW) public void funB() { //... } @Transactional(propagation = Propagation.REQUIRES) pu

老痒的农舍 1万+

Affinity Propagation

Affinity propagation 其中两点相似度s(i, j)的度量默认采用负欧氏距离。 sklearn.cluster.AffinityPropagation 有参数preference(设定每一个点的偏好,将偏好于跟其他节点的相似性进行比较,选择 高的作为exmplar,未设定则使用所有相似性的中位数)、damping (阻尼系数, 利用阻尼系数与1-阻尼系数对r 及 a进

斯温的博客 2155

Spring事务传播问题 — PROPAGATION_REQUIRES_NEW

原文:https://blog.csdn.net/wangjunjun2008/article/details/53669951 一、描述 Spring遇到嵌套事务时,当被嵌套的事务被定义为“PROPAGATION_REQUIRES_NEW”时, 内层Service的方法被调用时,外层方法的事务被挂起; 内层事务相对于外层事务是完全独立的,有独立的隔离性等等。 二、实验 但实验时却遇到一个奇怪的问...

BraveHeart 1900

Spring 事务传播机制源码浅析——PROPAGATION_REQUIRED 默认传播机制

事务传播是 Spring 中提出来的概念,很多人使用事务都是在方法上标注注解,然而,如果每个方法上面都标注着注解,那么你应该执行哪个注解的功能呢?所以这里就需要一个机制或者规范来解决这个问题,能够保证所有方法上面的事务能够正常执行(或者说是让事务生效),这个就是事务的传播机制。你觉得有发生事务传播嘛?

龚小帅的博客 7568

PROPAGATION_REQUIRES_NEW 和 PROPAGATION_NESTED區別

PROPAGATION_REQUIRES_NEW 和 PROPAGATION_NESTED两种传播机制的是容易混淆的。      1. 开启事务的多少,PROPAGATION_REQUIRES_NEW会开启很多事务,外部事务挂起,里面的事务独立执行,对性能的损耗较大。PROPAGATION_NESTED为父子事务,实际上是借助jdbc的savepoint实现的,属于同一个事物。 2. PROPA...

维度 527

PROPAGATION_REQUIRED、PROPAGATION_NESTED、PROPAGATION_REQUIRES_NEW

来源:http://sharajava.iteye.com/blog/78270 (上图AD和BC代表两个事务,1,2,3代表事务执行的三个阶段。图简陋了点,有点像“金箍棒”) 使用嵌套事务的场景有两点需求: 需要事务BC与事务AD一起commit,即:作为事务AD的子事务,事务BC只有在事务AD成功commit时(阶段3成功)才commi

aosica321的专栏 1128

@Transactional和Propagation的使用

@Transactional事务几点注意 这里面有几点需要大家留意: A. 一个功能是否要事务,必须纳入设计、编码考虑。不能仅仅完成了基本功能就ok。 B. 如果加了事务,必须做好开发环境测试(测试环境也尽量触发异常、测试回滚),确保事务生效。 C. 以下列了事务使用过程的注意事项,请大家留意 不要在接口上声明@Transactional ,而要在具体类的方法上使用 @Transactiona...

John的博客 3964

SPRING 事务控制 (PROPAGATION_NESTED)

在 SPRING 中一共定义了六种事务传播属性 PROPAGATION_REQUIRED -- 支持当前事务,如果当前没有事务,就新建一个事务。这是最常见的选择。 PROPAGATION_SUPPORTS -- 支持当前事务,如果当前没有事务,就以非事务方式执行。 PROPAGATION_MANDATORY -- 支持当前事务,如果当前没有事务,就抛出异常。 PROPAGATION_REQ

z69183787的专栏 1万+

简单理解Spring中的PROPAGATION_NESTED

结合http://www.iteye.com/topic/35907,简单总结一下自己的理解: (上图AD和BC代表两个事务,1,2,3代表事务执行的三个阶段。图简陋了点,有点像“金箍棒”) 使用嵌套事务的场景有两点需求: 需要事务BC与事务AD一起commit,即:作为事务AD的子事务,事务BC只有在事务AD成功commit时(阶段3成功)才commit。这个需求简单称之为“...

sharajava的博客 1788
上一篇: bytebuddy源码解析
下一篇: A 编码 目录
舞动的痞老板
博客等级 码龄9年 99粉丝 150原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址