Skip to content

refactor(backend): Split the checkBusinessWithBizID function into sin…#15843

Draft
ylgeeker wants to merge 5 commits intoTencentBlueKing:v1.5.0from
ylgeeker:feat/dbha-v2-strategy-workflow/#15826
Draft

refactor(backend): Split the checkBusinessWithBizID function into sin…#15843
ylgeeker wants to merge 5 commits intoTencentBlueKing:v1.5.0from
ylgeeker:feat/dbha-v2-strategy-workflow/#15826

Conversation

@ylgeeker
Copy link
Collaborator

refactor(backend): Split the checkBusinessWithBizID function into single-responsibility atomic functions.

…her request. issue: TencentBlueKing#15826

- New failure_collector.go: FailureCollector/FailureGroup/FailureInstanceInfo
  for grouping detector failures by (BkCloudID, DbType).
- databaseLivenessDoubleCheck uses collector; createSwitcherRequestWithGroup
  replaces createSwitcherRequestWithIPs; add skipped-count logging.
- Rename key to instanceKey with doc comment; add bindSwitchingStrategyWithBizId stub.
@ylgeeker ylgeeker force-pushed the feat/dbha-v2-strategy-workflow/#15826 branch from 87a3e95 to 2bb13f0 Compare January 29, 2026 09:23
…iding window. issue: TencentBlueKing#15826

- 1. Replace cloudIdIps with FailureCollector/FailureGroup; extract types to failure_collector.go
- 2. createSwitcherRequestWithGroup(group); matchStrategyForGroup gates switching by strategy (EventName/Reason, TriggerCount, Priority; only Action=switch triggers)
- 3. FailureGroup gains EventName/EventNameReason for strategy match
- 4. Add time-based SlidingWindow: Push merges same instance and counts, Pop returns expired entries; RWMutex (RLock for Len, Lock for Push/Pop)
@ylgeeker ylgeeker force-pushed the feat/dbha-v2-strategy-workflow/#15826 branch from 32d67d5 to 6f3499f Compare February 3, 2026 07:25
@ylgeeker ylgeeker force-pushed the feat/dbha-v2-strategy-workflow/#15826 branch from 5dcabad to db5f10c Compare February 4, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant