refactor(backend): Split the checkBusinessWithBizID function into sin…#15843
Draft
ylgeeker wants to merge 5 commits intoTencentBlueKing:v1.5.0from
Draft
refactor(backend): Split the checkBusinessWithBizID function into sin…#15843ylgeeker wants to merge 5 commits intoTencentBlueKing:v1.5.0from
ylgeeker wants to merge 5 commits intoTencentBlueKing:v1.5.0from
Conversation
…gle-responsibility atomic functions. issue: TencentBlueKing#15826
…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.
87a3e95 to
2bb13f0
Compare
…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)
32d67d5 to
6f3499f
Compare
5dcabad to
db5f10c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor(backend): Split the checkBusinessWithBizID function into single-responsibility atomic functions.