Skip to content

Enable DrioDataSource to fetch data from warm path#61

Merged
bjorn-einar-bjartnes-4ss merged 5 commits into
mainfrom
use_warmpath_in_DrioDataSource
Mar 9, 2026
Merged

Enable DrioDataSource to fetch data from warm path#61
bjorn-einar-bjartnes-4ss merged 5 commits into
mainfrom
use_warmpath_in_DrioDataSource

Conversation

@heidi-holm-4ss
Copy link
Copy Markdown
Contributor

@heidi-holm-4ss heidi-holm-4ss commented Mar 5, 2026

This PR updates _get to support get_samples_aggregate for warm storage while keeping backward compatibility for archive.

I’m unsure whether the default storage should remain archive for backward compatibility, or if it should be set to warm by default, enabling aggregated queries out of the box. I started with warm path, and default aggregation_period tick, but when querying a full day this is much slower than going to the archive for high frequency timeseries

I'm also not sure if we should expand the documentation a bit on the DrioDataSource, it is not very specific the drio part compared to "any" data source at the moment

DrioDataSource is today at least used by odst

lables : dict
Labels and timeseries IDs as key/value pairs.
storage : str, optional
If 'warm' (default), drio is fetched from warm storage. If 'archive', data is fetched from the archive.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change default, it should be a new major version.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, perhaps a new 0.8 version since we do not have 1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or change it back to archive as default to avoid any issues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with not changing defaults.

@bjorn-einar-bjartnes-4ss
Copy link
Copy Markdown
Contributor

bjorn-einar-bjartnes-4ss commented Mar 9, 2026

If we change back to 'archive' as default and perhaps mention in doc strings that 'warm' path is currently experimental in this version, and specificy that the deault of tick might be slow.

@branislav-jenco-4ss
Copy link
Copy Markdown
Contributor

@heidi-holm-4ss on a brief look it looks like the caching should still work with warm path, but have you tested it? Since the fingerprint is based on kwargs to the init of the class, then the aggregation_period and function should be part of it, as far as I can tell, so it looks ok.

@heidi-holm-4ss
Copy link
Copy Markdown
Contributor Author

@heidi-holm-4ss on a brief look it looks like the caching should still work with warm path, but have you tested it? Since the fingerprint is based on kwargs to the init of the class, then the aggregation_period and function should be part of it, as far as I can tell, so it looks ok.

I have not tested it extensively, but I have tested that I get a new "cache file" if I change the aggregation period or method

@bjorn-einar-bjartnes-4ss bjorn-einar-bjartnes-4ss merged commit 78e18fd into main Mar 9, 2026
9 checks passed
@bjorn-einar-bjartnes-4ss bjorn-einar-bjartnes-4ss deleted the use_warmpath_in_DrioDataSource branch March 9, 2026 13:35
@heidi-holm-4ss heidi-holm-4ss added the feature New feature label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Development

Successfully merging this pull request may close these issues.

3 participants