suvodeep-pyne commented on PR #19737:
URL: https://github.com/apache/pinot/pull/19737#issuecomment-6027266166
**Update: 7c753f3b71** addresses the review feedback.
- **Timeout comes from a cluster config listener.**
`ReingestionConsumptionTimeout`, a `PinotClusterConfigChangeListener`
registered in `BaseServerStarter`, holds a validated timeout.
`ReingestionResource` gets it injected as a typed binding. The raw cluster
config provider binding, the `PINOT_CONFIGURATION` lookup and the cast are
gone. An invalid value logs one WARN per config change instead of one per
request. The timeout is read when a job starts consuming.
- **`ReingestionResource` is now `@Singleton`.** It was created per request,
so it never worked as intended:
- duplicate requests were never rejected; they now get 409;
- `GET /reingestSegment/jobs` always returned `[]`;
- `MAX_PARALLEL_REINGESTIONS` was never applied;
- every request leaked a thread pool.
- **Wait loop:**
- an interrupt is reported as an interrupt (the flag is deliberately not
restored, so that closing the writer still waits for its consumer thread);
- the unused grace period is removed;
- the condition is a `BooleanSupplier`.
- **Javadoc** now covers live pickup of the exact key only, the fallback
when the cluster value is removed or invalid, and why the cluster config takes
precedence.
- **Tests:**
- split into plain unit tests (`ReingestionConsumptionTimeoutTest`,
`ReingestionResourceTest`) and endpoint tests (`ReingestionResourceApiTest`);
- a new singleton regression test checks the 409 and the jobs listing
while a job is running;
- the max-timeout test is rewritten.
The PR description is updated to match.
--
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]