mutable_state_task_store.go ×4

Frontier kind: Code frontier

unlabeled · c_d8e9c8e6359b

3 tests · 4061 LOC · 178 files · introduces 0 tests · 42 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges42 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
718 ranges4061 lines · 178 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: 42 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 40 introduced LOC · 4 ranges

Open complete file

738 case tasks.CategoryTypeImmediate:
739 return d.getHistoryImmedidateTasks(ctx, request)
740 > case tasks.CategoryTypeScheduled: mutable_state_task_store.go
741 > return d.getHistoryScheduledTasks(ctx, request)
742 default:
743 panic(fmt.Sprintf("Unknown task category type: %v", request.TaskCategory.Type().String()))
794 ctx context.Context,
795 request *p.GetHistoryTasksRequest,
796 > ) (*p.InternalGetHistoryTasksResponse, error) { mutable_state_task_store.go
797 > // execution manager should already validated the request
798 > // Reading history tasks need to be quorum level consistent, otherwise we could lose task
799 >
800 > minTimestamp := p.UnixMilliseconds(request.InclusiveMinTaskKey.FireTime)
801 > maxTimestamp := p.UnixMilliseconds(request.ExclusiveMaxTaskKey.FireTime)
802 > query := d.Session.Query(templateGetHistoryScheduledTasksQuery,
803 > request.ShardID,
804 > request.TaskCategory.ID(),
805 > rowTypeHistoryTaskNamespaceID,
806 > rowTypeHistoryTaskWorkflowID,
807 > rowTypeHistoryTaskRunID,
808 > minTimestamp,
809 > maxTimestamp,
810 > ).WithContext(ctx)
811 >
812 > iter := query.PageSize(request.BatchSize).PageState(request.NextPageToken).Iter()
813 >
814 > response := &p.InternalGetHistoryTasksResponse{}
815 > var timestamp time.Time
816 > var taskID int64
817 > var data []byte
818 > var encoding string
819 >
820 > for iter.Scan(&timestamp, &taskID, &data, &encoding) {
821 > response.Tasks = append(response.Tasks, p.InternalHistoryTask{
822 > Key: tasks.NewKey(timestamp, taskID),
823 > Blob: p.NewDataBlob(data, encoding),
824 > })
825 >
826 > timestamp = time.Time{}
827 > taskID = 0
828 > data = nil
829 > encoding = ""
830 > }
831 > if len(iter.PageState()) > 0 {
832 response.NextPageToken = iter.PageState()
833 }
834
835 > if err := iter.Close(); err != nil { mutable_state_task_store.go
836 return nil, gocql.ConvertError("GetHistoryScheduledTasks", err)
837 }
838
839 > return response, nil mutable_state_task_store.go
840 }
841
go.temporal.io/server/common/persistence/cassandra/util.go 2 introduced LOC · 1 range

Open complete file

591 visibilityTimestamp := defaultVisibilityTimestamp
592 if isScheduledTask {
593 > visibilityTimestamp = p.UnixMilliseconds(task.Key.FireTime) util.go
594 > }
595 batch.Query(templateCreateHistoryTaskQuery,
596 shardID,