Skip to content

fix(pruning): Filter non-existent S3/Azure partitions before query ex…#127

Merged
xe-nvdk merged 1 commit intomainfrom
fix/partition-pruner-missing-s3-paths
Jan 16, 2026
Merged

fix(pruning): Filter non-existent S3/Azure partitions before query ex…#127
xe-nvdk merged 1 commit intomainfrom
fix/partition-pruner-missing-s3-paths

Conversation

@xe-nvdk
Copy link
Member

@xe-nvdk xe-nvdk commented Jan 16, 2026

…ecution

Time-filtered queries were failing when the requested range included partitions that don't exist in S3. The partition pruner was generating paths for all hours in the range without checking existence for remote storage (it only checked for local storage).

Changes:

  • Add SetStorageBackend() to PartitionPruner for remote path validation
  • Implement filterExistingRemotePaths() using ListDirectories() to check which S3/Azure partition directories actually exist
  • Fix GeneratePartitionPaths() to preserve s3:// and azure:// URL scheme (was using filepath.Join which mangles URLs)
  • Wire up storage backend in QueryHandler

When partitions are missing, queries now return partial results from existing partitions instead of failing entirely. This is critical for Grafana dashboards with "Last 30 days" time ranges where historical data may have gaps.

Fixes #125

…ecution

Time-filtered queries were failing when the requested range included
partitions that don't exist in S3. The partition pruner was generating
paths for all hours in the range without checking existence for remote
storage (it only checked for local storage).

Changes:
- Add SetStorageBackend() to PartitionPruner for remote path validation
- Implement filterExistingRemotePaths() using ListDirectories() to check
  which S3/Azure partition directories actually exist
- Fix GeneratePartitionPaths() to preserve s3:// and azure:// URL scheme
  (was using filepath.Join which mangles URLs)
- Wire up storage backend in QueryHandler

When partitions are missing, queries now return partial results from
existing partitions instead of failing entirely. This is critical for
Grafana dashboards with "Last 30 days" time ranges where historical
data may have gaps.

Fixes #125
@xe-nvdk xe-nvdk merged commit 7895da4 into main Jan 16, 2026
3 checks passed
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.

Partition pruner fails on non-existent time partitions

1 participant