xiangfu0 opened a new pull request, #19139:
URL: https://github.com/apache/pinot/pull/19139
Removes public APIs whose deprecations shipped between 2016 and 2022. This
is the first in a series of per-release deprecation sweeps; each PR removes the
APIs deprecated in one release line, so reviewers can reason about a single
deprecation window at a time.
Every removed member was verified to have zero non-deprecated production
callers via repo-wide grep. In-repo test callers were migrated to the
replacements. Full-reactor `test-compile`, `checkstyle:check`, and
`license:check` pass.
## Removed
| API | Replacement | Deprecated |
|---|---|---|
| `Schema.addField(String, FieldSpec)` | `addField(FieldSpec)` | 2016
(third-eye compat) |
| `FileUploadDownloadClient` legacy URI builders + scheme/auth-less
overloads (incl. `getOldUploadSegmentHttp(s)URI`) | the auth-aware variants
named in each `@see` | 2018, 2021 |
| `SegmentGenerationUtils.getTableConfig(String)` | the auth-token overload
| 2021 |
| `GenericRow.init(Map)`, `putField(String, Object)` | `putValues`,
`putValue` | 2019 |
| `ControllerStarter`, `HelixBrokerStarter`, `HelixServerStarter`,
`MinionStarter` legacy ctors + `applyXxxConfig` | no-arg construction +
`init(PinotConfiguration)` | 2021 |
| `PinotTaskExecutorFactory.init(MinionTaskZkMetadataManager)` + every
now-empty override | `init(zkMetadataManager, minionConf)` | 2021 |
| `FieldConfig` 5-arg ctor (singular `IndexType`) | the `List<IndexType>`
ctor / `Builder` | 2021 |
| `ServerInstance.toServerRoutingInstance(TableType, boolean)` | the
`RoutingType` overload | 2021 |
| `SegmentPrunerService.prune(List, QueryContext)` | the 4-arg overload |
2022 |
| `PinotReflectionUtils.getReflectionLock()` | `runWithLock(Runnable)` |
2022 |
| `ConnectionFactory.fromController(scheme, host, port)` ×2 | the URL-string
overloads | 2022 |
## Staged: `/table/{table}/size`
`ServerTableSizeReader` now calls the plural `GET /tables/{table}/size`. The
singular `/table/...` form was deprecated in **2016** — its comment reads
*"/table was by mistake. We will use plural from hereon"* — but the controller
itself was still the caller, which is why it survived nine years.
The repoint is behavior-identical: the deprecated handler `getTableSizeOld`
is a pure delegate to `getTableSize`, which is exactly what the plural path
maps to (same `TableSizeInfo`, same params, same metadata version). It is safe
because the plural endpoint has shipped on the server since well before 0.8.0,
so an upgraded controller resolves it against any supported server.
The deprecated **server endpoint is intentionally retained in this PR**, so
that an N-1 controller still works against an N server. It can be deleted in a
follow-up once this caller migration has shipped.
One test consequence: both endpoints now share the `/tables/` prefix, so
`TableSizeReaderCompressionStatsTest` can no longer separate its size and
compression-stats handlers by context path (the JDK rejects duplicate
contexts). It now registers a single context that dispatches on the
`/compression-stats` suffix. All 24 tests across the four table-size test
classes pass.
## Not removed
- `ControllerGauge.OFFLINE_TABLE_ESTIMATED_SIZE` was in the original sweep
list but is still emitted by `StorageQuotaChecker`, so it stays.
- The `HeaderAdder` ThirdEye URI-rewrite hack (a 2017 `TODO HACK`) was
originally included but has been pulled out. It was never `@Deprecated`, it
runs `@PreMatching` on every controller request, and it has no test coverage
anywhere — so it is a live, unverifiable behavior change that does not belong
bundled with mechanical source-level removals. It will get its own small PR.
## backward-incompat
Please apply the **`backward-incompat`** label, and please loop in
minion-task and client/connector plugin maintainers.
These are source-breaking for out-of-tree code compiled against `pinot-spi`,
`pinot-common`, `pinot-java-client`, and the minion task-factory SPI. **The
runtime-breaking case worth calling out to operators**: plugin jars (custom
`RecordReader` / `RecordExtractor` / `RecordTransformer`) are compiled against
a released `pinot-spi` and loaded at runtime, so a stale jar calling
`GenericRow.putField`, `Schema.addField(String, FieldSpec)`, or the
`FieldConfig` 5-arg constructor will fail with `NoSuchMethodError` rather than
a clean startup error. **Out-of-tree plugin jars should be rebuilt against the
new `pinot-spi` before upgrading servers and minions.** Note
`japicmp.skip=true` in the root pom, so nothing in CI gates this.
Third-party `PinotTaskExecutorFactory` implementations must drop their empty
1-arg `init` override; that one is source-breaking but runtime-safe, since the
2-arg method was already abstract and every implementation must therefore
already have it.
No config keys, wire formats, or ZK-serialized fields are touched, so there
is no rolling-upgrade ordering requirement beyond the staged endpoint noted
above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]