Skip to content

Conversation

@Starosdev
Copy link
Owner

@Starosdev Starosdev commented Nov 29, 2025

Summary

Fix smart attributes query to use limit() instead of tail() for fetching recent entries, improving query performance.

Origin

Cherry-picked from upstream PR: AnalogJ#829
Original author: @jianyun8023

Changes

  • Optimizes InfluxDB queries for SMART attribute retrieval

Closes #2

…fetching recent entries

- Updated the aggregation logic in `aggregateSmartAttributesQuery` to utilize `limit()` for retrieving the newest entries after sorting, ensuring correct data retrieval.
- Adjusted subquery construction to improve clarity and maintainability.
- Enhanced comments for better understanding of the changes made.

(cherry picked from commit c1f70ff)
@Starosdev Starosdev self-assigned this Nov 29, 2025
@Starosdev Starosdev added bug Something isn't working priority:medium Medium priority labels Nov 29, 2025
@Starosdev Starosdev added this to the v1.1.0 - Bug Fixes milestone Nov 29, 2025
@Starosdev Starosdev merged commit 2849531 into master Nov 30, 2025
12 of 13 checks passed
@Starosdev
Copy link
Owner Author

Merged to Fork (2025-11-30)

Cherry-picked into Starosdev/scrutiny.

Changes Made

  1. Use limit() instead of tail() for fetching recent SMART entries
    • Optimizes query performance for SMART attribute history
    • More efficient data retrieval from InfluxDB
PR #14
Release v1.1.0
Docker ghcr.io/starosdev/scrutiny

Thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority:medium Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SCR-6] Merge upstream PR #829: Optimize SMART attributes query

3 participants