mutable_state_task_store.go ×4

Frontier kind: Code frontier

unlabeled · c_3baf42dd3170

3 tests · 4068 LOC · 179 files · introduces 0 tests · 49 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges49 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
724 ranges4068 lines · 179 files · Browse complete extent
All tests (intent)
3 testsBrowse 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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

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

go.temporal.io/server/common/persistence/cassandra/mutable_state_task_store.go 37 introduced LOC · 4 ranges

Open complete file

231 case tasks.CategoryIDTransfer:
232 return d.getTransferTasks(ctx, request)
233 > case tasks.CategoryIDTimer: mutable_state_task_store.go
234 > return d.getTimerTasks(ctx, request)
235 case tasks.CategoryIDVisibility:
236 return d.getVisibilityTasks(ctx, request)
366 ctx context.Context,
367 request *p.GetHistoryTasksRequest,
368 > ) (*p.InternalGetHistoryTasksResponse, error) { mutable_state_task_store.go
369 > // Reading timer tasks need to be quorum level consistent, otherwise we could lose tasks
370 > minTimestamp := p.UnixMilliseconds(request.InclusiveMinTaskKey.FireTime)
371 > maxTimestamp := p.UnixMilliseconds(request.ExclusiveMaxTaskKey.FireTime)
372 > query := d.Session.Query(templateGetTimerTasksQuery,
373 > request.ShardID,
374 > rowTypeTimerTask,
375 > rowTypeTimerNamespaceID,
376 > rowTypeTimerWorkflowID,
377 > rowTypeTimerRunID,
378 > minTimestamp,
379 > maxTimestamp,
380 > ).WithContext(ctx)
381 > iter := query.PageSize(request.BatchSize).PageState(request.NextPageToken).Iter()
382 >
383 > response := &p.InternalGetHistoryTasksResponse{}
384 > var timestamp time.Time
385 > var taskID int64
386 > var data []byte
387 > var encoding string
388 >
389 > for iter.Scan(&timestamp, &taskID, &data, &encoding) {
390 > response.Tasks = append(response.Tasks, p.InternalHistoryTask{
391 > Key: tasks.NewKey(timestamp, taskID),
392 > Blob: p.NewDataBlob(data, encoding),
393 > })
394 >
395 > timestamp = time.Time{}
396 > taskID = 0
397 > data = nil
398 > encoding = ""
399 > }
400 > if len(iter.PageState()) > 0 {
401 response.NextPageToken = iter.PageState()
402 }
403
404 > if err := iter.Close(); err != nil { mutable_state_task_store.go
405 return nil, gocql.ConvertError("GetTimerTasks", err)
406 }
407
408 > return response, nil mutable_state_task_store.go
409 }
410
go.temporal.io/server/common/persistence/cassandra/util.go 12 introduced LOC · 1 range

Open complete file

524 ) error {
525 for _, task := range timerTasks {
526 > batch.Query(templateCreateTimerTaskQuery, util.go
527 > shardID,
528 > rowTypeTimerTask,
529 > rowTypeTimerNamespaceID,
530 > rowTypeTimerWorkflowID,
531 > rowTypeTimerRunID,
532 > task.Blob.Data,
533 > task.Blob.EncodingType.String(),
534 > p.UnixMilliseconds(task.Key.FireTime),
535 > task.Key.TaskID,
536 > )
537 > }
538 return nil
539 }