Kiarash Norouzi
05/01/2024, 7:23 AMAbhishek Balaji Radhakrishnan
05/01/2024, 7:54 PMloadForever cluster rule in addition to loadByPeriod(P1M), that will essentially act as a catch-all and load everything. You could either drop the cluster default rule, or if you don’t care about tiering, you could use dropBeforeByPeriod(P1M) + cluster default loadForever.Kiarash Norouzi
05/02/2024, 8:07 AMsegmentGranularity is DAY, and we have segments from 2023-12-25 up to now (2024-05-02), and all of them are cached on Historicals too.
I made some changes. First, I tried to remove the default loadForever rule, but Druid showed me an error saying that cluster-level rules cannot be empty. Then I changed the cluster default rule to the loadByPeriod(P1M) to somehow remove the loadForever impact, waited about 2 hours, and also restarted the Historicals, but I didn’t see any changes in the number of cached segments.
I’m not allowed to apply any drop rules right now, that’s why I’m looking for a solution to just reduce the number of cached segments on Historicals.Abhishek Balaji Radhakrishnan
05/03/2024, 6:07 AMRunRules, it seems that if there are no rules evaluated, you’d expect to see alerts for segments that have no rules associated, but we don’t mark those segments as unused, so they will still be loaded by the data servers. That’s likely what you’re seeing here.
Basically if you have a cluster default rule of loadByPeriod(P1M), and say you have 10 segments spanning a month each, for e.g.,:`[T-P10M, T-P9M),...,[T-P2M, T-P1M), [T-P1M, T)`, then only the most recent month segment [T-P1M, T) should be loaded. You’d see alerts for the remaining 9 month-granularity segments, but still loaded by the historicals as Druid doesn’t take any action on these segments.Abhishek Balaji Radhakrishnan
05/03/2024, 6:18 AMloadForever and dropForever as the default cluster rule and have datasource-specific retention rules that are like a combination of loadByPeriod(), dropBeforeByPeriod(), etc.
In your case, it seems that adding a datasource-specific rule dropBeforeByPeriod(P1M) while keeping the cluster default loadForever should achieve the 1 month cache period for that datasource.Kiarash Norouzi
05/03/2024, 9:41 AM