Akanksha-kedia opened a new issue, #18490:
URL: https://github.com/apache/pinot/issues/18490

   ## Description
   
   `StreamOp.fetchExistingTotalDocs` in the compatibility verifier crashes with 
a `NullPointerException` when the broker response includes exceptions.
   
   ## Root Cause
   
   The `exceptions` field in the broker query response is a JSON **array** 
(e.g., `[{"errorCode": 410, "message": "..."}]`), but the code calls 
`exceptions.get("errorCode")` as if it were a JSON object. When Jackson's 
`ArrayNode.get(String)` is called, it always returns `null`, causing the 
subsequent `errorCode.asInt()` to throw an NPE.
   
   ## Steps to Reproduce
   
   1. Run the compatibility verifier while a table's segments are still loading 
(rolling upgrade scenario)
   2. The broker returns an error response with a non-empty `exceptions` array
   3. `fetchExistingTotalDocs` hits the exceptions-handling path and crashes
   
   ## Expected Behavior
   
   The method should:
   1. Correctly index into the exceptions array (e.g., 
`exceptions.get(0).get("errorCode")`)
   2. Handle null defensively
   3. Treat `BROKER_SEGMENT_UNAVAILABLE` (305) as a transient condition (same 
as `BROKER_INSTANCE_MISSING`) and retry
   
   ## Affected Component
   
   
`pinot-compatibility-verifier/src/main/java/org/apache/pinot/compat/StreamOp.java`


-- 
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]

Reply via email to