kfaraz commented on issue #13080: URL: https://github.com/apache/druid/issues/13080#issuecomment-1250095450
@599166320 , for your case, what you need may look like this: ``` loadByPeriod P3D _defaultTier=1 replica, cold=1 replica loadByPeriod P7D cold=1 replica dropForever ``` 1. Data not more than 3 days old lives on both default and cold tiers 2. Data more than 3 days old and upto 7 days old lives only on cold tier 3. older data is dropped The only thing I added was the cold tier replicas in the first rule. If you don't have that, cold tier will not have data of the past 3 days. Is this what you intended? @FrankChen021 , maybe there is some middle ground here? The default rule should be `loadForever` to allow things to function properly right out the box, without having to configure anything. But when a user explicitly modifies the rules (for a datasource or global), it's only natural that the last rule be a `forever` rule, either load or drop. If the user has already given it as so, good, otherwise, we tack on a `dropForever` rule at the end ourselves. (The user wouldn't mind us doing this as they were particular about loading data only upto a certain period/interval.) Translated to the code, this simply means that if no rule matches, we drop the segment. This is because no rule matching implies that the retention rules have been explicitly modified by the user, otherwise the default `loadForever` would have matched. We already have an alert for segments that don't match any rule but the behaviour should still be reconsidered because it is indeed a little counterintuitive. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
