File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
historyserver/pkg/eventserver Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -789,7 +789,7 @@ func (h *EventHandler) storeEvent(eventMap map[string]any) error {
789789 StartTime int64
790790 EndTime int64
791791 }
792- existingKeys := make (map [eventKey ]struct {})
792+ existingKeys := make (map [eventKey ]struct {}, len ( t . ProfileData . Events ) + len ( rawEvents ) )
793793 for _ , e := range t .ProfileData .Events {
794794 existingKeys [eventKey {e .EventName , e .StartTime , e .EndTime }] = struct {}{}
795795 }
@@ -1260,6 +1260,16 @@ func getChromeTraceColor(eventName string) string {
12601260 }
12611261}
12621262
1263+ // extractActorIDFromTaskID extracts the ActorID from a TaskID following Ray's ID specification.
1264+ //
1265+ // Design doc: src/ray/design_docs/id_specification.md
1266+ // - TaskID: 8B unique + 16B ActorID (total 24 bytes = 48 hex chars)
1267+ // - ActorID: 12B unique + 4B JobID (total 16 bytes = 32 hex chars)
1268+ //
1269+ // For a 48-character hex TaskID, the last 32 hex characters (bytes 16–48)
1270+ // correspond to the ActorID. This function further checks the "unique" portion
1271+ // of the ActorID (first 24 hex chars) and returns an empty string if it is all Fs,
1272+ // which indicates normal/driver tasks with no associated actor.
12631273func extractActorIDFromTaskID (taskIDHex string ) string {
12641274 if len (taskIDHex ) != 48 {
12651275 return "" // can't process if encoded in base64
You can’t perform that action at this time.
0 commit comments