• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / cadence / 01903bc8-798b-41ce-bd5b-c8557de7de2b
72%

Build:
DEFAULT BRANCH: master
Ran 21 Jun 2024 05:45PM UTC
Jobs 1
Files 720
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Jun 2024 05:11PM UTC coverage: 71.496% (-0.002%) from 71.498%
01903bc8-798b-41ce-bd5b-c8557de7de2b

push

buildkite

web-flow
Persist failover history in DomainInfo data (#6139)

**What changed?**
Added functionality to persist recent failover event data in the DomainInfo whenever a valid failover is executed.
`FailoverEvent` contains the failover `timestamp`, `fromCluster`, `toCluster`, and `FailoverType`("Force"/"Grace") information.
`FailoverHistory` is the key in the `DomainInfo` `data`. It's a slice stored as a string containing the `FailoverEvents`, with max size defined by `dynamicconfig.FrontendFailoverHistoryMaxSize`. It has a default value of 5 and domain filter allowed.
`FailoverHistory` always keep the n most recent `FailoverEvents` and it's sorted by descending timestamp.

**Why?**
Persist failover information, improving failover visibility to clients and the cadence team.

**How did you test it?**
Unit tests and integration tests. Tested locally, triggering failovers in a multiple Cadence clusters with replication environment.

**Potential risks**
The change does not affect the logic of UpdateDomain. It adds the failover info to the DomainInfo data. The main risk is that we introduce something that can cause the code to panic. Errors while adding the FailoverHistory are logged as warnings and do not return/interrupt the UpdateDomain action.

**Release notes**

**Documentation Changes**

27 of 39 new or added lines in 3 files covered. (69.23%)

39 existing lines in 11 files now uncovered.

106671 of 149198 relevant lines covered (71.5%)

2612.88 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
95.6
-0.3% common/domain/handler.go
8
0.0
common/constants.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
89.05
0.0% common/task/weighted_round_robin_task_scheduler.go
2
73.23
-1.57% service/matching/tasklist/db.go
2
76.65
0.2% service/matching/tasklist/task_list_manager.go
2
66.67
-0.5% common/persistence/historyManager.go
3
50.46
-0.55% common/log/tag/tags.go
3
85.52
-1.01% common/persistence/nosql/nosql_task_store.go
3
85.57
0.52% service/history/task/fetcher.go
4
45.35
-0.79% common/types/history.go
4
90.18
-1.45% service/matching/tasklist/matcher.go
5
68.87
-4.72% service/history/engine/engineimpl/record_activity_task_started.go
9
75.33
-2.39% service/matching/tasklist/task_reader.go
Jobs
ID Job ID Ran Files Coverage
1 01903bc8-798b-41ce-bd5b-c8557de7de2b.1 21 Jun 2024 05:45PM UTC 720
71.5
Source Files on build 01903bc8-798b-41ce-bd5b-c8557de7de2b
  • Tree
  • List 720
  • Changed 291
  • Source Changed 0
  • Coverage Changed 23
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 1e300fc1 on github
  • Prev Build on master (#0190377E...)
  • Next Build on master (#01903CD7...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc