message.pb.go ×5

Frontier kind: Code frontier

unlabeled · c_5de2b169ed88

2 tests · 3226 LOC · 148 files · introduces 0 tests · 70 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges70 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
514 ranges3226 lines · 148 files · Browse complete extent
All tests (intent)
2 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: 70 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/user_data_manager.go 57 introduced LOC · 5 ranges

Open complete file

735
736 // LocalBacklogPriorityChanged can be called on any normal partition.
737 > func (m *userDataManagerImpl) LocalBacklogPriorityChanged(backlogPriority map[PhysicalTaskQueueVersion]int64) { user_data_manager.go
738 > // TODO: later, we'll send this data to the root to propagate instead of just keeping it
739 > // locally and merging.
740 >
741 > normal, ok := m.partition.(*tqid.NormalPartition)
742 > if !ok {
743 return
744 }
745
746 > byVersion := make([]*taskqueuespb.EphemeralData_ByVersion, 0, len(backlogPriority)) user_data_manager.go
747 > for ver, levels := range backlogPriority {
748 > byVersion = append(byVersion, &taskqueuespb.EphemeralData_ByVersion{
749 > Version: ver.WorkerDeploymentVersionS(),
750 > BacklogPriorityLevels: levels,
751 > })
752 > }
753
754 > newPartition := []*taskqueuespb.EphemeralData_ByPartition{ user_data_manager.go
755 > &taskqueuespb.EphemeralData_ByPartition{
756 > Partition: int32(normal.PartitionId()),
757 > Version: byVersion,
758 > },
759 > }
760 >
761 > m.updateEphemeralData(func(newData *taskqueuespb.EphemeralData) {
762 > newData.Partition = newPartition
763 > })
764 }
765
799 // updateEphemeralData updates the ephemeral data owned by this partition. The update function
800 // will be given a non-nil clone of the current data, which it should mutate.
801 > func (m *userDataManagerImpl) updateEphemeralData(update func(*taskqueuespb.EphemeralData)) { user_data_manager.go
802 > m.lock.Lock()
803 > defer m.lock.Unlock()
804 >
805 > newData := common.CloneProto(m.myEphemeralData.GetData())
806 > if newData == nil {
807 > newData = &taskqueuespb.EphemeralData{}
808 > }
809 > update(newData)
810 > m.myEphemeralData = &taskqueuespb.VersionedEphemeralData{
811 > Data: newData,
812 > Version: time.Now().UnixNano(),
813 > }
814 > m.mergeEphemeralDataLocked()
815 }
816
835 }
836
837 > func (m *userDataManagerImpl) mergeEphemeralDataLocked() { user_data_manager.go
838 > m.mergedEphemeralData = &taskqueuespb.VersionedEphemeralData{
839 > Data: &taskqueuespb.EphemeralData{
840 > // data is already separated by partition, so we can just concatenate
841 > Partition: slices.Concat(
842 > m.incomingEphemeralData.GetData().GetPartition(),
843 > m.myEphemeralData.GetData().GetPartition(),
844 > ),
845 > // scale info always comes from the root, so only one of these should be non-nil
846 > Scale: cmp.Or(
847 > m.incomingEphemeralData.GetData().GetScale(),
848 > m.myEphemeralData.GetData().GetScale(),
849 > ),
850 > },
851 > Version: time.Now().UnixNano(),
852 > }
853 >
854 > close(m.ephemeralDataChanged)
855 > m.ephemeralDataChanged = make(chan struct{})
856 > if m.onEphemeralDataChanged != nil {
857 go m.onEphemeralDataChanged(m.mergedEphemeralData.Data)
858 }
go.temporal.io/server/api/taskqueue/v1/message.pb.go 13 introduced LOC · 5 ranges

Open complete file

817 func (*EphemeralData) ProtoMessage() {}
818
819 > func (x *EphemeralData) ProtoReflect() protoreflect.Message { message.pb.go
820 > mi := &file_temporal_server_api_taskqueue_v1_message_proto_msgTypes[9]
821 > if x != nil {
822 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
823 if ms.LoadMessageInfo() == nil {
826 return ms
827 }
828 > return mi.MessageOf(x) message.pb.go
829 }
830
834 }
835
836 > func (x *EphemeralData) GetPartition() []*EphemeralData_ByPartition { message.pb.go
837 > if x != nil {
838 > return x.Partition
839 > }
840 > return nil
841 }
842
843 func (x *EphemeralData) GetScale() *PartitionScaleInfo {
844 if x != nil {
845 > return x.Scale message.pb.go
846 > }
847 return nil
848 }
888 func (x *VersionedEphemeralData) GetData() *EphemeralData {
889 if x != nil {
890 > return x.Data message.pb.go
891 > }
892 return nil
893 }