returns requestId for each broker query request
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 195
Description
## what's the problem?
Return a unique `requestId` always is important for tracing/debugging, to find related logging events for example. There're some limitation at the moment:
1. it's not available to every queries in broker, only`MultiStageBrokerRequestHandler` generates one and included in `BrokerResponseNativeV2`;
2. In java-client, `org.apache.pinot.client.BrokerResponse` is a reduced set of `org.apache.pinot.common.response.BrokerResponse`, `requestId` is lost with many other metadata fields;
## Proposed changes
To address these limitations, I would like to suggest some changes as below:
* generate `requestId` in [PinotClientRequest.java](https://github.com/apache/pinot/blob/880a074c7ae71ff3937171e504f6287d48c0fa7f/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java#L81), and add a new field `requestId` in `org.apache.pinot.common.response.BrokerResponse`;
* remove `org.apache.pinot.client.BrokerResponse` and use `response.BrokerResponse` directly;
Contributor guide
Assessment
This issue has not been assessed yet.