Skip to content

Commit 4f4de93

Browse files
authored
Upgrade parquet common and expose parquet labels cache config (#6937)
* update parquet common and expose parquet labels cache config Signed-off-by: yeya24 <[email protected]> * update docs Signed-off-by: Ben Ye <[email protected]> --------- Signed-off-by: yeya24 <[email protected]> Signed-off-by: Ben Ye <[email protected]>
1 parent 46ec0a5 commit 4f4de93

File tree

16 files changed

+1315
-98
lines changed

16 files changed

+1315
-98
lines changed

docs/blocks-storage/querier.md

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,255 @@ blocks_storage:
14181418
# CLI flag: -blocks-storage.bucket-store.metadata-cache.partitioned-groups-list-ttl
14191419
[partitioned_groups_list_ttl: <duration> | default = 0s]
14201420

1421+
parquet_labels_cache:
1422+
# The parquet labels cache backend type. Single or Multiple cache backend
1423+
# can be provided. Supported values in single cache: memcached, redis,
1424+
# inmemory, and '' (disable). Supported values in multi level cache: a
1425+
# comma-separated list of (inmemory, memcached, redis)
1426+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.backend
1427+
[backend: <string> | default = ""]
1428+
1429+
inmemory:
1430+
# Maximum size in bytes of in-memory parquet-labels cache used (shared
1431+
# between all tenants).
1432+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.inmemory.max-size-bytes
1433+
[max_size_bytes: <int> | default = 1073741824]
1434+
1435+
memcached:
1436+
# Comma separated list of memcached addresses. Supported prefixes are:
1437+
# dns+ (looked up as an A/AAAA query), dnssrv+ (looked up as a SRV
1438+
# query, dnssrvnoa+ (looked up as a SRV query, with no A/AAAA lookup
1439+
# made after that).
1440+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.addresses
1441+
[addresses: <string> | default = ""]
1442+
1443+
# The socket read/write timeout.
1444+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.timeout
1445+
[timeout: <duration> | default = 100ms]
1446+
1447+
# The maximum number of idle connections that will be maintained per
1448+
# address.
1449+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.max-idle-connections
1450+
[max_idle_connections: <int> | default = 16]
1451+
1452+
# The maximum number of concurrent asynchronous operations can occur.
1453+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.max-async-concurrency
1454+
[max_async_concurrency: <int> | default = 3]
1455+
1456+
# The maximum number of enqueued asynchronous operations allowed.
1457+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.max-async-buffer-size
1458+
[max_async_buffer_size: <int> | default = 10000]
1459+
1460+
# The maximum number of concurrent connections running get operations.
1461+
# If set to 0, concurrency is unlimited.
1462+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.max-get-multi-concurrency
1463+
[max_get_multi_concurrency: <int> | default = 100]
1464+
1465+
# The maximum number of keys a single underlying get operation should
1466+
# run. If more keys are specified, internally keys are split into
1467+
# multiple batches and fetched concurrently, honoring the max
1468+
# concurrency. If set to 0, the max batch size is unlimited.
1469+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.max-get-multi-batch-size
1470+
[max_get_multi_batch_size: <int> | default = 0]
1471+
1472+
# The maximum size of an item stored in memcached. Bigger items are not
1473+
# stored. If set to 0, no maximum size is enforced.
1474+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.max-item-size
1475+
[max_item_size: <int> | default = 1048576]
1476+
1477+
# Use memcached auto-discovery mechanism provided by some cloud provider
1478+
# like GCP and AWS
1479+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.auto-discovery
1480+
[auto_discovery: <boolean> | default = false]
1481+
1482+
set_async_circuit_breaker_config:
1483+
# If true, enable circuit breaker.
1484+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.set-async.circuit-breaker.enabled
1485+
[enabled: <boolean> | default = false]
1486+
1487+
# Maximum number of requests allowed to pass through when the circuit
1488+
# breaker is half-open. If set to 0, by default it allows 1 request.
1489+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.set-async.circuit-breaker.half-open-max-requests
1490+
[half_open_max_requests: <int> | default = 10]
1491+
1492+
# Period of the open state after which the state of the circuit
1493+
# breaker becomes half-open. If set to 0, by default open duration is
1494+
# 60 seconds.
1495+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.set-async.circuit-breaker.open-duration
1496+
[open_duration: <duration> | default = 5s]
1497+
1498+
# Minimal requests to trigger the circuit breaker.
1499+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.set-async.circuit-breaker.min-requests
1500+
[min_requests: <int> | default = 50]
1501+
1502+
# Consecutive failures to determine if the circuit breaker should
1503+
# open.
1504+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.set-async.circuit-breaker.consecutive-failures
1505+
[consecutive_failures: <int> | default = 5]
1506+
1507+
# Failure percentage to determine if the circuit breaker should open.
1508+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.memcached.set-async.circuit-breaker.failure-percent
1509+
[failure_percent: <float> | default = 0.05]
1510+
1511+
redis:
1512+
# Comma separated list of redis addresses. Supported prefixes are: dns+
1513+
# (looked up as an A/AAAA query), dnssrv+ (looked up as a SRV query,
1514+
# dnssrvnoa+ (looked up as a SRV query, with no A/AAAA lookup made after
1515+
# that).
1516+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.addresses
1517+
[addresses: <string> | default = ""]
1518+
1519+
# Redis username.
1520+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.username
1521+
[username: <string> | default = ""]
1522+
1523+
# Redis password.
1524+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.password
1525+
[password: <string> | default = ""]
1526+
1527+
# Database to be selected after connecting to the server.
1528+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.db
1529+
[db: <int> | default = 0]
1530+
1531+
# Specifies the master's name. Must be not empty for Redis Sentinel.
1532+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.master-name
1533+
[master_name: <string> | default = ""]
1534+
1535+
# The maximum number of concurrent GetMulti() operations. If set to 0,
1536+
# concurrency is unlimited.
1537+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.max-get-multi-concurrency
1538+
[max_get_multi_concurrency: <int> | default = 100]
1539+
1540+
# The maximum size per batch for mget.
1541+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.get-multi-batch-size
1542+
[get_multi_batch_size: <int> | default = 100]
1543+
1544+
# The maximum number of concurrent SetMulti() operations. If set to 0,
1545+
# concurrency is unlimited.
1546+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.max-set-multi-concurrency
1547+
[max_set_multi_concurrency: <int> | default = 100]
1548+
1549+
# The maximum size per batch for pipeline set.
1550+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.set-multi-batch-size
1551+
[set_multi_batch_size: <int> | default = 100]
1552+
1553+
# The maximum number of concurrent asynchronous operations can occur.
1554+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.max-async-concurrency
1555+
[max_async_concurrency: <int> | default = 3]
1556+
1557+
# The maximum number of enqueued asynchronous operations allowed.
1558+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.max-async-buffer-size
1559+
[max_async_buffer_size: <int> | default = 10000]
1560+
1561+
# Client dial timeout.
1562+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.dial-timeout
1563+
[dial_timeout: <duration> | default = 5s]
1564+
1565+
# Client read timeout.
1566+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.read-timeout
1567+
[read_timeout: <duration> | default = 3s]
1568+
1569+
# Client write timeout.
1570+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.write-timeout
1571+
[write_timeout: <duration> | default = 3s]
1572+
1573+
# Whether to enable tls for redis connection.
1574+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.tls-enabled
1575+
[tls_enabled: <boolean> | default = false]
1576+
1577+
# Path to the client certificate file, which will be used for
1578+
# authenticating with the server. Also requires the key path to be
1579+
# configured.
1580+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.tls-cert-path
1581+
[tls_cert_path: <string> | default = ""]
1582+
1583+
# Path to the key file for the client certificate. Also requires the
1584+
# client certificate to be configured.
1585+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.tls-key-path
1586+
[tls_key_path: <string> | default = ""]
1587+
1588+
# Path to the CA certificates file to validate server certificate
1589+
# against. If not set, the host's root CA certificates are used.
1590+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.tls-ca-path
1591+
[tls_ca_path: <string> | default = ""]
1592+
1593+
# Override the expected name on the server certificate.
1594+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.tls-server-name
1595+
[tls_server_name: <string> | default = ""]
1596+
1597+
# Skip validating server certificate.
1598+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.tls-insecure-skip-verify
1599+
[tls_insecure_skip_verify: <boolean> | default = false]
1600+
1601+
# If not zero then client-side caching is enabled. Client-side caching
1602+
# is when data is stored in memory instead of fetching data each time.
1603+
# See https://redis.io/docs/manual/client-side-caching/ for more info.
1604+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.cache-size
1605+
[cache_size: <int> | default = 0]
1606+
1607+
set_async_circuit_breaker_config:
1608+
# If true, enable circuit breaker.
1609+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.set-async.circuit-breaker.enabled
1610+
[enabled: <boolean> | default = false]
1611+
1612+
# Maximum number of requests allowed to pass through when the circuit
1613+
# breaker is half-open. If set to 0, by default it allows 1 request.
1614+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.set-async.circuit-breaker.half-open-max-requests
1615+
[half_open_max_requests: <int> | default = 10]
1616+
1617+
# Period of the open state after which the state of the circuit
1618+
# breaker becomes half-open. If set to 0, by default open duration is
1619+
# 60 seconds.
1620+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.set-async.circuit-breaker.open-duration
1621+
[open_duration: <duration> | default = 5s]
1622+
1623+
# Minimal requests to trigger the circuit breaker.
1624+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.set-async.circuit-breaker.min-requests
1625+
[min_requests: <int> | default = 50]
1626+
1627+
# Consecutive failures to determine if the circuit breaker should
1628+
# open.
1629+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.set-async.circuit-breaker.consecutive-failures
1630+
[consecutive_failures: <int> | default = 5]
1631+
1632+
# Failure percentage to determine if the circuit breaker should open.
1633+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.redis.set-async.circuit-breaker.failure-percent
1634+
[failure_percent: <float> | default = 0.05]
1635+
1636+
multilevel:
1637+
# The maximum number of concurrent asynchronous operations can occur
1638+
# when backfilling cache items.
1639+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.multilevel.max-async-concurrency
1640+
[max_async_concurrency: <int> | default = 3]
1641+
1642+
# The maximum number of enqueued asynchronous operations allowed when
1643+
# backfilling cache items.
1644+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.multilevel.max-async-buffer-size
1645+
[max_async_buffer_size: <int> | default = 10000]
1646+
1647+
# The maximum number of items to backfill per asynchronous operation.
1648+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.multilevel.max-backfill-items
1649+
[max_backfill_items: <int> | default = 10000]
1650+
1651+
# Size of each subrange that bucket object is split into for better
1652+
# caching.
1653+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.subrange-size
1654+
[subrange_size: <int> | default = 16000]
1655+
1656+
# Maximum number of sub-GetRange requests that a single GetRange request
1657+
# can be split into when fetching parquet labels file. Zero or negative
1658+
# value = unlimited number of sub-requests.
1659+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.max-get-range-requests
1660+
[max_get_range_requests: <int> | default = 3]
1661+
1662+
# TTL for caching object attributes for parquet labels file.
1663+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.attributes-ttl
1664+
[attributes_ttl: <duration> | default = 168h]
1665+
1666+
# TTL for caching individual subranges.
1667+
# CLI flag: -blocks-storage.bucket-store.parquet-labels-cache.subrange-ttl
1668+
[subrange_ttl: <duration> | default = 24h]
1669+
14211670
# Maximum number of entries in the regex matchers cache. 0 to disable.
14221671
# CLI flag: -blocks-storage.bucket-store.matchers-cache-max-items
14231672
[matchers_cache_max_items: <int> | default = 0]

0 commit comments

Comments
 (0)