chasm_engine.go ×2

Frontier kind: Joint frontier

unlabeled · c_f7cb76e766c8

1 test · 6378 LOC · 234 files · introduces 1 test · 29 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
2 ranges29 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1232 ranges6378 lines · 234 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 29 introduced LOC across 2 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/chasm_engine.go 29 introduced LOC · 2 ranges

Open complete file

708 _, executionLease, err := e.getExecutionLease(ctx, requestRef)
709 if err != nil {
710 > return nil, err chasm_engine.go
711 > }
712 defer executionLease.GetReleaseFn()(nil) //nolint:revive
713
1219 // Mutable state was previously detected as stale and got reloaded,
1220 // do a final check to ensure mutable state is not stale after reload.
1221 > err = executionLease.GetMutableState().ChasmTree().IsStale(ref) chasm_engine.go
1222 > if err != nil {
1223 > logger := log.With(shardContext.GetLogger(),
1224 > tag.WorkflowNamespaceID(ref.NamespaceID),
1225 > tag.WorkflowID(ref.BusinessID),
1226 > tag.WorkflowRunID(ref.RunID),
1227 > )
1228 >
1229 > if errors.Is(err, consts.ErrStaleState) {
1230 > // This could happen when there's a replication lag upon force failover,
1231 > // and caller is using the reference from the original cluster in the
1232 > // new cluster before replication catches up.
1233 > //
1234 > // This could also happen due to data loss in the database,
1235 > // but we can't really distinguish the two cases here, so always return
1236 > // a retryable error here.
1237 > //
1238 > // TODO: consider adding a clusterID field to the generated token to distinguish
1239 > // the two cases.
1240 > logger.Warn(
1241 > "stale state after mutable state reload, could due to force namespace failover or data loss",
1242 > tag.Error(err),
1243 > )
1244 >
1245 > executionLease.GetReleaseFn()(nil)
1246 > return nil, nil, serviceerror.NewUnavailablef("stale state, please retry")
1247 > }
1248
1249 // Stale reference case is already handled above.