dataroaring commented on PR #62086: URL: https://github.com/apache/doris/pull/62086#issuecomment-4258243569
Addressed the review feedback in commit b50ad34: **Comment #1 (getTabletMeta() GC concern):** Fixed the main hot-path usage — `buildPartitionInfoBySkew()` now uses individual field accessors (`getDbId`, `getTableId`, `getPartitionId`, `getIndexId`, `getStorageMedium`) instead of constructing a `TabletMeta` object per tablet. This loop iterates over all tablets (potentially millions), so avoiding per-iteration object allocation significantly reduces GC pressure. The remaining `getTabletMeta()` call at line 229 (tablet report handling) passes the full object to downstream methods and runs once per-BE, so it's appropriate to keep. **Comment #2 (redundant containsKey in addTablet):** Already addressed in a prior revision — `addTablet()` now relies on `tabletMetaStore.add()` returning `false` for duplicates. **Comment #3 (unused newSchemaHashes):** Already addressed in a prior revision — the `newSchemaHashes` array was removed. **Comment #4 (getReplicaNumByBeIdAndStorageMedium):** Already addressed in a prior revision — the method already uses `tabletMetaStore.getStorageMedium(tabletId)` directly. **Latent bug fix:** Also fixed a latent bug where `Preconditions.checkNotNull(tabletMeta)` ran after `tabletMeta` was already dereferenced (would NPE before reaching the check). Replaced with a `NOT_EXIST_VALUE` check on the first accessor call. — ThinkOps 🤖 -- 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]
