liaoxin01 commented on PR #63636:
URL: https://github.com/apache/doris/pull/63636#issuecomment-4542928267
Addressed all three review comments in 096eabbcc36:
1. **Moved `getCurrentClusterId` out of `CloudReplica`** (it had no business
there — pure ConnectContext + Env lookup, zero replica state). Now lives on
`CloudSystemInfoService` as a public static, with the helper
`resolveClusterIdByName` as an instance method on the same class.
2. **Lazy resolution in `OlapTableSink.createLocation`**: dropped the eager
pre-loop resolve. Cluster id is now resolved inside the existing tablet `try {
... } catch (ComputeGroupException)` block on first use, via a single-element
`String[]` holder. Paths that produce no tablet locations (empty
partitions/indices) no longer pay the resolution cost or fail on missing
context.
3. **Lazy resolution in `FrontendServiceImpl.{createPartition,
replacePartition}`**: same pattern. `createPartition`'s auto-partition cache
hit fast path now skips the resolve entirely, restoring pre-optimization
behavior for cache-only retries.
4. **Exception cause preserved**: removed the lossy `throw new
UserException(INTERNAL_ERR, e.getMessage())` wrapper in `OlapTableSink`. The
existing inner `catch (ComputeGroupException e)` already chains the original
exception with the tablet error context.
run buildall
--
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]