SAMZA-2479: Add configurable default for min compaction lag ms#1305
Conversation
|
@prateekm @bharathkk can you take a look? |
mynameborat
left a comment
There was a problem hiding this comment.
Few questions
- What do you think about having this configuration under
JobConfighierarchy instead ofStoreConfig? I see why it is the way it is in your current PR and the reason for it to belong underStoreConfig. However,stores.default....dilutes the (implicit) stronger contract of what followsstoresis the store name and makesdefaultas a reserved store name. - What are the challenges in coming up with code default for it? Can you add details in PR description about the limitations of code default and the need for configurability?
|
mynameborat
left a comment
There was a problem hiding this comment.
Minor documentation questions.
Looks good to me
Feature: Allow changelog min.compaction.lag.ms to be assigned a configurable default value that will apply to all stores if present, and unless overriden by a store-specific config.
The need for a different value comes from an evaluation done internally (within LI) that we can have a more relaxed setting than 4hr across all our jobs. The code default was chosen when the feature was implemented and is now part of a released build of samza; this 4hr value has been communicated to OSS customers and since changing this value has an operational impact on customers' kafka deployments (storage space) and each customer may have different thresholds for what is acceptable in terms of cost, making this default configurable empowers them to easily configure their samza/kafka clusters.
Changes: Introducing
stores.default.changelog.min.compaction.lag.msstore config as a way to indicate a default value that will apply to all changelogs unless overriden for a store specifically.Tests: Added a unit test which verifies the config works as expected and honors the correct precedence.
API Changes: None
Upgrade instructions: None
Usage instructions: Value of the configuration must be specified in milliseconds. Use
stores.default.changelog.min.compaction.lag.msto configure a default, andstores.<store-name>.changelog.min.compaction.lag.msto set a store specific value. The precedence is as follows: 1) store specific configuration; if not present then 2) configured default; if not present then 3) default hard-coded in StorageConfig.java