pinpoint-apm/pinpoint · error · IllegalArgumentException
non-positive tieLength:<tieLength>
Error message
non-positive tieLength:<tieLength>
What it means
Constructor validation in LastRowWithTiesResultsExtractor: tieLength must be strictly positive because it caps how many tie rows are fetched beyond the limit. Zero or negative values make no sense, so the constructor throws IllegalArgumentException immediately.
Source
Thrown at commons-hbase/src/main/java/com/navercorp/pinpoint/common/hbase/LastRowWithTiesResultsExtractor.java:60
private final int tieLength;
@Nullable
private final LastRowHandler<T> rowHandler;
private final ToIntFunction<T> resultSizeHandler;
public LastRowWithTiesResultsExtractor(RowMapper<T> rowMapper,
int limit,
int tieOffset,
int tieLength,
@Nullable LastRowHandler<T> rowHandler) {
this.rowMapper = Objects.requireNonNull(rowMapper, "RowMapper");
this.limit = limit;
if (tieOffset < 0) {
throw new IllegalArgumentException("negative tieOffset:" + tieOffset);
}
this.tieOffset = tieOffset;
if (tieLength <= 0) {
throw new IllegalArgumentException("non-positive tieLength:" + tieLength);
}
this.tieLength = tieLength;
this.rowHandler = rowHandler;
this.resultSizeHandler = resolveResultSizeHandler(rowMapper);
}
private ToIntFunction<T> resolveResultSizeHandler(RowMapper<T> rowMapper) {
if (rowMapper instanceof RowTypeHint hint) {
Class<?> clazz = hint.rowType();
return ResultSizeHandlers.getHandler(clazz);
}
return new LazyResultSizeHandler<>();
}
@Override
public List<T> extractData(ResultScanner results) throws Exception {
final List<T> rs = new ArrayList<>();
int rowNum = 0;View on GitHub (pinned to 744c3d3075)
Solutions
- Pass tieLength >= 1; remove the extractor and use a plain ResultsExtractor if you do not need tie rows
- Fix the config/property source that yields a non-positive tieLength
- Add Math.max(1, tieLength) only if your caller semantics allow silently coercing to 1
Example fix
// before new LastRowWithTiesResultsExtractor<>(mapper, limit, 0, 0, handler); // after new LastRowWithTiesResultsExtractor<>(mapper, limit, 0, 10, handler);
Defensive patterns
Strategy: validation
Validate before calling
if (tieLength <= 0) throw new IllegalArgumentException("tieLength must be >= 1, got " + tieLength); Prevention
- Validate tie/page-size config properties at load time (> 0)
- Don't overload -1/0 as 'no ties'; skip the extractor instead
- Default tieLength to a sane positive value when config is absent
When it happens
Trigger: Calling new LastRowWithTiesResultsExtractor<>(rowMapper, limit, tieOffset, tieLength, rowHandler) with tieLength <= 0, e.g. passing 0 to mean 'no ties' or a computed size that underflowed.
Common situations: Misconfigured tie/page-size properties resolving to 0; using -1 as an 'unlimited' sentinel where this class requires a positive count.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- negative tieOffset:<tieOffset>
- invalid params
- limit must be positive or -1(unlimited): <limit>
- maxBuckets should be in 1..256 range
- maxBuckets should be in 1..256 range
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/82242819997450ad.
Report an issue: GitHub.