Skip to content

Conversation

@ismailtsdln
Copy link

Summary of Changes

1. Fixed StackOverflowError in MetricAgeOffIterator (#150)

The seekIfNecessary method previously used recursion to skip aged-off data.
In scenarios with a large number of skipped keys, this caused a StackOverflowError.

The method was refactored to use a robust while loop instead of recursion.

MetricAgeOffIterator.java

private void seekIfNecessary() {
    while (super.hasTop()) {
        // ... skipping logic with continue ...
        return; // Exit when valid data found or source exhausted
    }
}
  1. Stabilized TimeSeriesGroupingIteratorTest (Flaky TimeSeriesGroupingIteratorTest #242)

The test suite relied on System.currentTimeMillis() for data generation, which resulted in non-deterministic failures depending on execution timing.

This was fixed by replacing dynamic timestamps with a fixed base timestamp to ensure reproducibility.

TimeSeriesGroupingIteratorTest.java

- long ts = ((System.currentTimeMillis() / 1000) * 1000);
+ long ts = 1705400000000L; // Fixed timestamp for reproducibility
  1. Cleanup of FastClasspathScanner (FastClasspathScanner is outdated -- consider porting to ClassGraph #169)

The project has fully transitioned to ClassGraph.
As a result, the unused version.fast-classpath-scanner property was removed from the root pom.xml.

pom.xml

- <version.fast-classpath-scanner>3.1.13</version.fast-classpath-scanner>

Verification Results :

Code Review :

Verified that the StackOverflowError fix eliminates all recursive calls from the skipping logic.

Confirmed that test stabilization uses fixed timestamps across all relevant test methods.

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.

1 participant