chore(pyamber): remove the unused worker-to-worker RPC proxy - #7794
Open
aglinxinyuan wants to merge 1 commit into
Open
chore(pyamber): remove the unused worker-to-worker RPC proxy#7794aglinxinyuan wants to merge 1 commit into
aglinxinyuan wants to merge 1 commit into
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 556 | 0.339 | 17,262/22,125/22,125 us | 🔴 +11.3% / 🔴 +41.9% |
| 🔴 | bs=100 sw=10 sl=64 | 1,164 | 0.71 | 83,558/115,068/115,068 us | 🔴 +8.9% / 🟢 +16.7% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,437 | 0.877 | 695,731/754,174/754,174 us | ⚪ within ±5% / 🟢 +38.5% |
Baseline details
Latest main ee06e4b from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 556 tuples/sec | 612 tuples/sec | 771.02 tuples/sec | -9.2% | -27.9% |
| bs=10 sw=10 sl=64 | MB/s | 0.339 MB/s | 0.373 MB/s | 0.471 MB/s | -9.1% | -28.0% |
| bs=10 sw=10 sl=64 | p50 | 17,262 us | 15,507 us | 12,749 us | +11.3% | +35.4% |
| bs=10 sw=10 sl=64 | p95 | 22,125 us | 23,642 us | 15,594 us | -6.4% | +41.9% |
| bs=10 sw=10 sl=64 | p99 | 22,125 us | 23,642 us | 19,320 us | -6.4% | +14.5% |
| bs=100 sw=10 sl=64 | throughput | 1,164 tuples/sec | 1,200 tuples/sec | 997.05 tuples/sec | -3.0% | +16.7% |
| bs=100 sw=10 sl=64 | MB/s | 0.71 MB/s | 0.732 MB/s | 0.609 MB/s | -3.0% | +16.7% |
| bs=100 sw=10 sl=64 | p50 | 83,558 us | 81,769 us | 100,339 us | +2.2% | -16.7% |
| bs=100 sw=10 sl=64 | p95 | 115,068 us | 105,655 us | 106,781 us | +8.9% | +7.8% |
| bs=100 sw=10 sl=64 | p99 | 115,068 us | 105,655 us | 113,101 us | +8.9% | +1.7% |
| bs=1000 sw=10 sl=64 | throughput | 1,437 tuples/sec | 1,433 tuples/sec | 1,037 tuples/sec | +0.3% | +38.5% |
| bs=1000 sw=10 sl=64 | MB/s | 0.877 MB/s | 0.875 MB/s | 0.633 MB/s | +0.2% | +38.5% |
| bs=1000 sw=10 sl=64 | p50 | 695,731 us | 696,815 us | 971,388 us | -0.2% | -28.4% |
| bs=1000 sw=10 sl=64 | p95 | 754,174 us | 790,807 us | 1,013,249 us | -4.6% | -25.6% |
| bs=1000 sw=10 sl=64 | p99 | 754,174 us | 790,807 us | 1,039,879 us | -4.6% | -27.5% |
Raw CSV
config_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,359.93,200,128000,556,0.339,17262.16,22124.73,22124.73
1,100,10,64,20,1718.46,2000,1280000,1164,0.710,83557.55,115068.42,115068.42
2,1000,10,64,20,13921.47,20000,12800000,1437,0.877,695731.06,754173.71,754173.71
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7794 +/- ##
=========================================
Coverage 91.25% 91.26%
Complexity 4471 4471
=========================================
Files 1171 1171
Lines 47124 47103 -21
Branches 5286 5286
=========================================
- Hits 43003 42988 -15
+ Misses 2447 2441 -6
Partials 1674 1674
*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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Removes
AsyncRPCClient.get_worker_interfaceand the_create_proxyhelper it is the sole caller of. 109 lines deleted, 0 added.Python workers talk only to the coordinator. The one production construction of the Python
AsyncRPCClientismain_loop.py:114, and it usescoordinator_stub()(lines 271, 651, 671, 817) andreceive(line 475). Worker-to-worker RPC initiated from Python is unused.get_worker_interfacetest_async_rpc_client.pyWorkerServiceStubasync_rpc_client.pyonly: the import, the return annotation, one argument. No.scalahit_create_proxyget_worker_interface— its sole caller_stream_unary/_unary_stream/_stream_streamProxyblockers inside_create_proxy, plus those three testsThere is no
getattr-style dynamic access anywhere. Scala'sworkerInterface(AsyncRPCClient.scala:140,WorkerServiceFs2Grpc) is a separate class and unrelated to this Python method._create_proxyis removed whole rather than just its_unary_unarybody: with its only caller gone, leaving aProxyclass holding three stream blockers and no reachable constructor would just relocate the dead code. The now-orphanedWorkerServiceStubimport goes too — it was the only orphan, since every other import is still used by_assign_context/_create_future/receive.Three tests were removed, deliberately
test_stream_unary_blocked,test_unary_stream_blockedandtest_stream_stream_blockedeach begin withclient.get_worker_interface(...)and then assert on blockers that exist only inside_create_proxy's localProxy. They exercise nothing else. Their removal orphanedimport pytest— the file's onlypytest.uses were those threepytest.raisescalls — so that went as well. The coordinator path is untouched: it goes through_assign_context, never had the blockers, and keeps its own tests.Scope: one item was assessed and deliberately kept
The audit that produced this also flagged
IcebergDocument's read side (get_uri,get_range,get_after,get_count) as having no production callers — onlyget()andwriter()are used (input_port_materialization_reader_runnable.py:161,170,main_loop.py:157,216,output_manager.py:148).None of it is removed here, because unlike the RPC proxy these are working implementations of
@abstractmethods onReadonlyVirtualDocument, i.e. the read contractIcebergDocumentexists to fulfil:get_range,get_afterandget_counthave live passing tests asserting real Iceberg behaviour, andget_range/get_afterare the only public entry points to the ranged form of_get_using_file_sequence_order. Removing them would strandnum_of_skipped_records,total_records_to_return,_skip_recordsand the skip loop inIcebergIterator.get_urihas zero references of any kind, so it is removable — but it is a working override, and deleting it silently changes behaviour from "returns the table location" to "raisesNotImplementedError" viaVirtualDocument's fallback, and drops parity with Scala'sIcebergDocument.getURI. That is an API decision, not a cleanup, so it is left for a maintainer.Verification
core/architecture/rpc/core/architecture/rpc/+core/storage/model/core/architecture+core/storage+test_main_loop.py,-m "not integration"The deselected test is
test_iceberg_rest_catalog_integration.py, excluded by its ownpytestmark.ruff format --check src/main/python src/test/python→ exit 0, "209 files already formatted".ruff check→ exit 0, "All checks passed!".git diff --numstatshows 0 insertions against 109 deletions, so there are no incidental rewrites.Any related issues, documentation, discussions?
Closes #7793
How was this PR tested?
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)