This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch branch-4.0 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit b55a3f7171dca2a74a75ded954e568ec8ca20848 Author: Lari Hotari <[email protected]> AuthorDate: Mon Jun 9 10:20:27 2025 +0300 [improve][broker] Add managedCursor/LedgerInfoCompressionType settings to broker.conf (#24391) (cherry picked from commit 1cc2402e07d225276f81d891bd466e7d6f11cbb9) --- conf/broker.conf | 23 +++++++++++++++++++++++ conf/standalone.conf | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/conf/broker.conf b/conf/broker.conf index 2a7e9ec1740..771e213736f 100644 --- a/conf/broker.conf +++ b/conf/broker.conf @@ -1315,6 +1315,29 @@ managedLedgerUnackedRangesOpenCacheSetEnabled=true # MetadataStore. managedLedgerMaxUnackedRangesToPersistInMetadataStore=1000 +# ManagedCursorInfo compression type, option values (NONE, LZ4, ZLIB, ZSTD, SNAPPY). +# If value is NONE, then save the ManagedCursorInfo bytes data directly without compression. +# Using compression reduces the size of persistent cursor (subscription) metadata. This enables using a higher +# managedLedgerMaxUnackedRangesToPersistInMetadataStore value and reduces the overall metadata stored in +# the metadata store such as ZooKeeper. +managedCursorInfoCompressionType=NONE + +# ManagedCursorInfo compression size threshold (bytes), only compress metadata when origin size more then this value. +# 0 means compression will always apply. +managedCursorInfoCompressionThresholdInBytes=16384 + +# ManagedLedgerInfo compression type, option values (NONE, LZ4, ZLIB, ZSTD, SNAPPY). +# If value is invalid or NONE, then save the ManagedLedgerInfo bytes data directly without compression. +# Using compression reduces the size of the persistent topic metadata. When a topic contains a large number of +# individual ledgers in BookKeeper or tiered storage, compression helps prevent the metadata size from exceeding +# the maximum size of a metadata store entry (ZNode in ZooKeeper). This also reduces the overall metadata stored +# in the metadata store such as ZooKeeper. +managedLedgerInfoCompressionType=NONE + +# ManagedLedgerInfo compression size threshold (bytes), only compress metadata when origin size more then this value. +# 0 means compression will always apply. +managedLedgerInfoCompressionThresholdInBytes=16384 + # Skip reading non-recoverable/unreadable data-ledger under managed-ledger's list. It helps when data-ledgers gets # corrupted at bookkeeper and managed-cursor is stuck at that ledger. autoSkipNonRecoverableData=false diff --git a/conf/standalone.conf b/conf/standalone.conf index a23e3ebb3fc..1320b7fd482 100644 --- a/conf/standalone.conf +++ b/conf/standalone.conf @@ -849,6 +849,29 @@ managedLedgerUnackedRangesOpenCacheSetEnabled=true # MetadataStore. managedLedgerMaxUnackedRangesToPersistInMetadataStore=1000 +# ManagedCursorInfo compression type, option values (NONE, LZ4, ZLIB, ZSTD, SNAPPY). +# If value is NONE, then save the ManagedCursorInfo bytes data directly without compression. +# Using compression reduces the size of persistent cursor (subscription) metadata. This enables using a higher +# managedLedgerMaxUnackedRangesToPersistInMetadataStore value and reduces the overall metadata stored in +# the metadata store such as ZooKeeper. +managedCursorInfoCompressionType=NONE + +# ManagedCursorInfo compression size threshold (bytes), only compress metadata when origin size more then this value. +# 0 means compression will always apply. +managedCursorInfoCompressionThresholdInBytes=16384 + +# ManagedLedgerInfo compression type, option values (NONE, LZ4, ZLIB, ZSTD, SNAPPY). +# If value is invalid or NONE, then save the ManagedLedgerInfo bytes data directly without compression. +# Using compression reduces the size of the persistent topic metadata. When a topic contains a large number of +# individual ledgers in BookKeeper or tiered storage, compression helps prevent the metadata size from exceeding +# the maximum size of a metadata store entry (ZNode in ZooKeeper). This also reduces the overall metadata stored +# in the metadata store such as ZooKeeper. +managedLedgerInfoCompressionType=NONE + +# ManagedLedgerInfo compression size threshold (bytes), only compress metadata when origin size more then this value. +# 0 means compression will always apply. +managedLedgerInfoCompressionThresholdInBytes=16384 + # Skip reading non-recoverable/unreadable data-ledger under managed-ledger's list. It helps when data-ledgers gets # corrupted at bookkeeper and managed-cursor is stuck at that ledger. autoSkipNonRecoverableData=false
