mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 08:57:17 +00:00
fix(sharding): fix log format verb and document intentional shard-0 fallback (#27222)
Signed-off-by: nitishfy <justnitish06@gmail.com> Signed-off-by: Nitish Kumar <justnitish06@gmail.com> Co-authored-by: Soumya Ghosh Dastidar <44349253+gdsoumya@users.noreply.github.com>
This commit is contained in:
parent
d3b06f113f
commit
212f51d851
1 changed files with 4 additions and 1 deletions
|
|
@ -222,7 +222,10 @@ func createConsistentHashingWithBoundLoads(replicas int, getCluster clusterAcces
|
|||
}
|
||||
shardIndexedByCluster[c.ID], err = strconv.Atoi(clusterIndex)
|
||||
if err != nil {
|
||||
log.Errorf("Consistent Hashing was supposed to return a shard index but it returned %d", err)
|
||||
log.Errorf("Failed to get shard index from consistent hashing, error=%v", err)
|
||||
// No continue here: strconv.Atoi returns 0 on failure, so the cluster falls back to shard 0.
|
||||
// This is intentional since shard 0 always exists (replicas > 0 is enforced by the caller),
|
||||
// so the cluster remains reconciled rather than being silently dropped.
|
||||
}
|
||||
numApps, ok := appDistribution[c.Server]
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Reference in a new issue