Repository navigation
refactor(amber, service): simplify CU, Iceberg, engine - #9519
Conversation
Add characterization tests across zero-overlap computing-unit, Iceberg storage, lock, and timer specs before dead-code and allocation cleanups.
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9519 +/- ##
============================================
- Coverage 91.62% 91.54% -0.09%
- Complexity 5039 5182 +143
============================================
Files 1284 1299 +15
Lines 56979 57918 +939
Branches 7402 7579 +177
============================================
+ Hits 52207 53021 +814
- Misses 2904 2955 +51
- Partials 1868 1942 +74
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ No material benchmark regressions detected🟢 7 better · 🔴 0 worse · ⚪ 8 noise (<±5%) · 0 without baseline
Baseline detailsLatest main
Raw CSVconfig_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,493.09,200,128000,406,0.248,23246.32,32633.61,32633.61
1,100,10,64,20,2319.90,2000,1280000,862,0.526,114866.77,128331.80,128331.80
2,1000,10,64,20,20539.91,20000,12800000,974,0.594,1020285.09,1124063.27,1124063.27 |
d1d9d25 to
5f3d628
Compare
Share requireTable on OnIceberg, keep = 0 initializers, inline the planning catalog, format part names with f"", and note why each part reloads the table (apache#7290). Let Dao.insert write the generated cuid back into the unit instead of a hand-written insert and update, drop the identity rethrow after createPod, return a ReadyImage from readyImageFor and remove nameOf, and cancel timers with foreach.
What changes were proposed in this PR?
Simplifies query round-trips, redundant allocations, exception rethrows, and unused test scaffolding across
computing-unit-managing-service,common/workflow-core, andamber(+228/−252 lines across 12 production files; +309/−267 total across 19 files including characterization tests and Iceberg/timer spec cleanups) without changing observable API or engine behavior:ComputingUnitManagingResource,CuratedImageResource): Fetch a ready curated image's ref and display name in a single query (readyImageForreturns aReadyImage, replacingnameOf), take the new unit's generatedcuidfromDao.insert's write-back so oneWorkflowComputingUnitdrives the row and the response withoutlastID()or a re-fetch, drop the identity rethrow aftercreatePod, filterTERMINATE_TIME IS NULLand joinCOMPUTING_UNIT_USER_ACCESSinlistComputingUnits, executeterminateComputingUnitwith a single transactional read returningEither, return(name, normalizedRef)directly fromCuratedImageResource.validate, shareselectImageSummaries, check image name uniqueness withfetchExists, drop the redundantStatus.Pendingsetter, and mark unused@Authparameters.VFSURIFactory,OnIceberg,IcebergDocument,IcebergTableWriter,IcebergDocumentSpec,IcebergDocumentConsoleMessagesSpec): SharerequireTableonOnIcebergbetweenIcebergDocumentandexpireSnapshots, compute field schemas and snapshot statistics in single passes, compare and format partition date bounds once, returngetTotalFileSizedirectly without a mutable accumulator, stream tuple ZIP exports viaiterator.zipWithIndex(each part still loads its table, so the export never holds one past its catalog, per [BYO-S3] Bound the per-warehouse catalog cache and release evicted catalogs #7290), removeIcebergTableWriter.recordIdand the redundantclose()guard, drop the unusedwarehousedefault parameter inVFSURIFactory, and remove redundantafterAll()forwarders in the two Iceberg integration specs.CoordinatorTimerService,CoordinatorTimerServiceSpec,AmberRuntime,Utils,ReplayLogManager,AsyncRPCServer,ServletAwareConfigurator): Cancel throughforeachand returnNonefromCoordinatorTimerService.disableTimerand drop unused fixture defaults inCoordinatorTimerServiceSpec; remove redundant identity-rethrowcatchblocks while preserving lock release, cursor advancement, cause unwrapping, and outer RPC error logging; and replace the trailing.map(...)with.foreach(...)inServletAwareConfigurator.Any related issues, documentation, discussions?
Closes #9516.
How was this PR tested?
Added characterization tests first (
1daf62da5c) covering unit listing/termination exclusivity and privilege precedence,IcebergTableWriteroverwrite/close behavior,IcebergDocumentgetCountand invalid-input errors,Utils.retrylock release, andCoordinatorTimerServicetimer cancellation. Verified two negative controls against those tests before applying the cleanup commit (5f3d6285f3): dropping theTERMINATE_TIME.isNullfilter failedComputingUnitManagingResourceSpec(51 passed, 1 failed), and omitting thecancel()call indisableTimerfailedCoordinatorTimerServiceSpec(10 passed, 4 failed).6139b06bc0pins the first ZIP entry name,part-00000.parquet, in WorkflowCore'sIcebergDocumentSpecbefore the switch fromString.formatto thefinterpolator; it passes on that commit'sString.formatcode (25/25) and fails once the padding is cut to%04d(24 passed, 1 failed).Verified all formatting, Scalafix, unit suites, and Hadoop-catalog Iceberg integration tests on final
HEAD(5c890204d5, with a cleangit merge-treeagainstbf6bf9fc3a):scalafix --check&scalafmtCheck(Compile & Test across all 3 modules): all 12 checks passed.ComputingUnitManagingService/test: 15 suites, 322 succeeded, 0 failed.WorkflowCore/testOnly * -- -l org.apache.texera.common.tags.NonParallelTest: 54 suites, 708 succeeded, 0 failed, 1 pre-existing pending.WorkflowExecutionService(engine, timer, replay, RPC, WebSocket unit specs): 10 suites, 96 succeeded, 0 failed.WorkflowExecutionService(IcebergDocumentSpec,IcebergDocumentConsoleMessagesSpecunderAMBER_TEST_FILTER=integration-only): 2 suites, 30 succeeded, 0 failed.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Antigravity IDE (Gemini 3.8 Flash), Claude Code (Claude Opus 5.5)