본문으로 건너뛰기

[Loki] shuffle shard 캐시 크기 설정을 experimental로 표시

PR 링크: grafana/loki#20526 상태: Merged | 변경: +7 / -7

들어가며

Grafana Loki의 partition ring에는 shuffle sharding을 위한 캐시 크기 설정(shuffle-shard-cache-size)이 있습니다. 이 설정은 아직 안정화되지 않았으며 향후 변경될 수 있지만, 문서와 CLI 도움말에서는 이를 명시하지 않고 있었습니다. 이 PR은 해당 플래그에 "Experimental" 접두사를 추가하여 사용자에게 주의를 환기시킵니다.

핵심 코드 분석

CLI 플래그 설명 변경

Before:

f.IntVar(&cfg.ShuffleShardCacheSize, prefix+"partition-ring.shuffle-shard-cache-size", 0,
    "The size of the cache used for shuffle sharding. If zero or negative, an unbounded cache is used. If positive, an LRU cache with the specified size is used.")

After:

f.IntVar(&cfg.ShuffleShardCacheSize, prefix+"partition-ring.shuffle-shard-cache-size", 0,
    "Experimental: The size of the cache used for shuffle sharding. If zero or negative, an unbounded cache is used. If positive, an LRU cache with the specified size is used.")

문서 설명 변경

# Before:
# The size of the cache used for shuffle sharding.

# After:
# Experimental: The size of the cache used for shuffle sharding.

왜 이게 좋은가

  • 사용자 기대치 관리: Experimental 표시로 이 설정이 향후 변경되거나 제거될 수 있음을 명확히 합니다.
  • 하위 호환성 부담 경감: Experimental로 표시된 기능은 breaking change 없이 수정할 수 있어 개발 유연성이 높아집니다.
  • 두 위치 동시 적용: dataobj-consumeringester 두 곳의 partition ring 설정에 모두 적용되었습니다.
  • 문서와 코드 일관성: CLI 도움말과 설정 문서가 동일한 메시지를 전달합니다.

참고 자료

댓글

관련 포스트

PR Analysis 의 다른글