Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ jobs:
- name: ShellCheck decode-backfill measurement scripts (issue #380)
run: shellcheck scripts/decode-backfill-estimate.sh scripts/test-decode-backfill-estimate.sh

- name: Resolved-path route-repair measurement script unit tests (issue #289)
run: bash scripts/test-resolved-path-route-repair-estimate.sh

- name: ShellCheck resolved-path route-repair measurement scripts (issue #289)
run: shellcheck scripts/resolved-path-route-repair-estimate.sh scripts/test-resolved-path-route-repair-estimate.sh

- name: QA blacklist script unit tests (issues #1977, #83)
run: bash qa/scripts/test-blacklist-sql.sh

Expand Down
6 changes: 6 additions & 0 deletions cmd/ingestor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ type Config struct {
// observations.resolved_path rows (#188, resolved_path_backfill.go).
ResolvedPathBackfill *ResolvedPathBackfillConfig `json:"resolvedPathBackfill,omitempty"`

// ResolvedPathRouteRepair opts into the one-off repair of
// observations.resolved_path rows written with the transmission's first
// route type (#289 M2, resolved_path_route_repair.go). Off by default: it
// overwrites values in place and keeps no copy of the previous ones.
ResolvedPathRouteRepair *ResolvedPathRouteRepairConfig `json:"resolvedPathRouteRepair,omitempty"`

// DecodeBackfill tunes the re-decoding of historical rows after the
// effective channel/region key set grows (#380, decode_backfill.go).
DecodeBackfill *DecodeBackfillConfig `json:"decodeBackfill,omitempty"`
Expand Down
10 changes: 10 additions & 0 deletions cmd/ingestor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,16 @@ func main() {
defer stopResolvedPathBackfill()
}

// #289 M2: repair resolved_path rows the pre-#308 backfill wrote with the
// transmission's first route type, once per database. Opt-in: the pass
// overwrites values in place and keeps no copy, so it waits for
// resolvedPathRouteRepair.enabled (PR #590 review F3). Same placement as
// the backfill above (it needs the same primed index and graph) and the
// same shutdown: cancelled here, resumed from its watermark next start.
routeRepairCtx, stopResolvedPathRouteRepair := context.WithCancel(context.Background())
defer stopResolvedPathRouteRepair()
store.StartResolvedPathRouteRepair(routeRepairCtx, cfg.ResolvedPathRouteRepairEnabled())

// #380: re-decode historical enc_<HEX> GRP_TXT rows and unknown-scoped
// transport rows whenever the effective key set grows (config/SIGHUP,
// approved shared channels, approved region scopes). Same placement as
Expand Down
8 changes: 8 additions & 0 deletions cmd/ingestor/observation_route_type_289_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ const (
directFrame289 = "1601c3aabb"
mixedMask289 = int64(0b0110) // routes 1 (FLOOD) and 2 (DIRECT)
floodMask289 = int64(0b0010) // route 1 only

// The transport route types, 0 (TRANSPORT_FLOOD) and 3
// (TRANSPORT_DIRECT). They share the low bit with the other family's
// non-transport type, so only bit 1 separates the families: a candidate
// test that looked at bit 0 would mis-classify exactly these two
// (PR #590 review F4).
transportFloodFrame289 = "1401c3aabb"
transportDirectFrame289 = "1701c3aabb"
)

func mask289(m int64) sql.NullInt64 { return sql.NullInt64{Int64: m, Valid: true} }
Expand Down
Loading
Loading