Skip to content

Conversation

@SungJin1212
Copy link
Member

This PR extracts the parquet shard cache implementation into a new dedicated package pkg/util/parquetutil.
This refactoring allows the shard cache logic to be reused by other components.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@SungJin1212 SungJin1212 requested a review from yeya24 December 8, 2025 09:45
@SungJin1212 SungJin1212 changed the title Refactor: move parquet shard cache to parquet util pkg Refactor: extract parquet shard cache to parquetutil pkg Dec 8, 2025
func newCacheMetrics(reg prometheus.Registerer) *cacheMetrics {
return &cacheMetrics{
hits: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{
Name: "cortex_parquet_queryable_cache_hits_total",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we remove queryable from the metric name? Or you make cortex_parquet_queryable as a prefix to those metrics

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you already have name as a label then we need to remove the parquet queryable prefix in metric name. Otherwise you make prefix configurable

}

type CacheConfig struct {
ParquetQueryableShardCacheSize int `yaml:"parquet_queryable_shard_cache_size"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be parquet shard cache size not parquet queryable cache size... It is a cache for parquet shard which exists in parquet store gateway as well

@SungJin1212 SungJin1212 force-pushed the Refactor-move-parquet-shard-cache-to-dedicated-pkg branch from f64b0a4 to 031650a Compare December 11, 2025 04:57
@SungJin1212
Copy link
Member Author

@yeya24
I deleted queryable to make only for parquet shard cache. WDYT?

@SungJin1212 SungJin1212 force-pushed the Refactor-move-parquet-shard-cache-to-dedicated-pkg branch 2 times, most recently from bc8a63d to cc9eba7 Compare December 11, 2025 06:11
Signed-off-by: SungJin1212 <[email protected]>
@SungJin1212 SungJin1212 force-pushed the Refactor-move-parquet-shard-cache-to-dedicated-pkg branch from cc9eba7 to ea253e3 Compare December 11, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants