Skip to content

Clarify datapoint retention docs to match purge behaviour - #3442

Merged
wborn merged 3 commits into
mainfrom
docs/datapoint-retention-meta
Oct 20, 2026
Merged

wborn merged 3 commits into
mainfrom
docs/datapoint-retention-meta

Conversation

@richturner

@richturner richturner commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #2352. The DATA_POINTS_MAX_AGE_DAYS (dataPointsMaxAgeDays) javadoc said the meta item "has no effect", but AssetDatapointService.purgeDataPoints() still uses its largest value across all attributes (rounded up to weeks) as a minimum for the global retention period. Following the review discussion on #2352 (drop chunks only once they are older than the longest retention), this keeps that behaviour and fixes the documentation to match.

Changes

  • MetaItemType: deprecation javadoc now describes the actual behaviour. The meta item can only extend retention, for all attributes, and has no effect when purging is disabled.
  • profile/deploy.yml: the comment documents OR_DATA_POINTS_MAX_AGE_WEEKS, the infinite default and the deprecated OR_DATA_POINTS_MAX_AGE_DAYS fallback.
  • README.md: updated the outdated "purged daily" sentence.
  • AssetDatapointService: fixed a typo in the class javadoc.

No behavioural changes.

Related docs issue: openremote/documentation#165

The DATA_POINTS_MAX_AGE_DAYS javadoc stated the meta item has no effect,
but the purge still uses its largest value across all attributes as a
minimum for the global retention period. Update the javadoc to describe
this, and update the deploy.yml comment and README to document
OR_DATA_POINTS_MAX_AGE_WEEKS and the infinite default retention.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is an initial AI-assisted review.

The updated retention documentation matches the current implementation, including the global week-based configuration, the deprecated fallback, and the effect of legacy attribute retention settings.

One Javadoc inconsistency remains: the original description of DATA_POINTS_MAX_AGE_DAYS still implies per-attribute purging, contradicting the updated deprecation explanation.

Comment thread model/src/main/java/org/openremote/model/value/MetaItemType.java
Updated deprecation comment for STORE_DATA_POINTS to clarify changes in retention policy.
@richturner

Copy link
Copy Markdown
Member Author

Updated @wborn

@sonarqubecloud

Copy link
Copy Markdown

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! 👍

@wborn
wborn added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@wborn
wborn added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit dd45b9f Oct 20, 2026
24 checks passed
@wborn
wborn deleted the docs/datapoint-retention-meta branch October 20, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants