Repository navigation
refactor(services): use the shared request-logging filter and SQL-state constant - #7796
Merged
aglinxinyuan merged 4 commits intoOct 12, 2026
Merged
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7796 +/- ##
=========================================
Coverage 92.60% 92.60%
Complexity 5044 5044
=========================================
Files 1252 1252
Lines 53574 53559 -15
Branches 6673 6668 -5
=========================================
- Hits 49611 49600 -11
+ Misses 2317 2316 -1
+ Partials 1646 1643 -3
*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:
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 710 | 0.433 | 14,204/17,425/17,425 us | 🟢 -28.3% / 🔴 +18.8% |
| 🔴 | bs=100 sw=10 sl=64 | 1,585 | 0.968 | 61,709/83,015/83,015 us | 🔴 +7.7% / 🟢 +42.7% |
| 🔴 | bs=1000 sw=10 sl=64 | 1,983 | 1.21 | 501,178/587,659/587,659 us | 🔴 +6.5% / 🟢 +73.9% |
Baseline details
Latest main f01f63d from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 710 tuples/sec | 696 tuples/sec | 866.99 tuples/sec | +2.0% | -18.1% |
| bs=10 sw=10 sl=64 | MB/s | 0.433 MB/s | 0.425 MB/s | 0.529 MB/s | +1.9% | -18.2% |
| bs=10 sw=10 sl=64 | p50 | 14,204 us | 12,342 us | 11,989 us | +15.1% | +18.5% |
| bs=10 sw=10 sl=64 | p95 | 17,425 us | 24,318 us | 14,672 us | -28.3% | +18.8% |
| bs=10 sw=10 sl=64 | p99 | 17,425 us | 24,318 us | 17,906 us | -28.3% | -2.7% |
| bs=100 sw=10 sl=64 | throughput | 1,585 tuples/sec | 1,642 tuples/sec | 1,111 tuples/sec | -3.5% | +42.6% |
| bs=100 sw=10 sl=64 | MB/s | 0.968 MB/s | 1.002 MB/s | 0.678 MB/s | -3.4% | +42.7% |
| bs=100 sw=10 sl=64 | p50 | 61,709 us | 59,053 us | 95,405 us | +4.5% | -35.3% |
| bs=100 sw=10 sl=64 | p95 | 83,015 us | 77,097 us | 102,332 us | +7.7% | -18.9% |
| bs=100 sw=10 sl=64 | p99 | 83,015 us | 77,097 us | 115,219 us | +7.7% | -28.0% |
| bs=1000 sw=10 sl=64 | throughput | 1,983 tuples/sec | 1,952 tuples/sec | 1,141 tuples/sec | +1.6% | +73.9% |
| bs=1000 sw=10 sl=64 | MB/s | 1.21 MB/s | 1.191 MB/s | 0.696 MB/s | +1.6% | +73.8% |
| bs=1000 sw=10 sl=64 | p50 | 501,178 us | 512,640 us | 938,794 us | -2.2% | -46.6% |
| bs=1000 sw=10 sl=64 | p95 | 587,659 us | 552,044 us | 984,521 us | +6.5% | -40.3% |
| bs=1000 sw=10 sl=64 | p99 | 587,659 us | 552,044 us | 1,008,827 us | +6.5% | -41.7% |
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,281.75,200,128000,710,0.433,14203.99,17425.37,17425.37
1,100,10,64,20,1261.55,2000,1280000,1585,0.968,61708.58,83015.42,83015.42
2,1000,10,64,20,10085.45,20000,12800000,1983,1.210,501177.76,587659.42,587659.42…r-and-sqlstate # Conflicts: # file-service/src/main/scala/org/apache/texera/service/resource/DatasetResource.scala # workflow-compiling-service/src/main/scala/org/apache/texera/service/WorkflowCompilingService.scala
kunwp1
approved these changes
Oct 12, 2026
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?
Two places where a shared helper already existed but a local copy or literal was used instead. 9 insertions, 27 deletions.
1.
WorkflowCompilingServicenow calls the sharedRequestLoggingFilter. It was the only Dropwizard-4 service still inlining its own anonymous request-logging filter; the other five (access-control, computing-unit-managing, config, file, notebook-migration) all callRequestLoggingFilter.register(environment.getApplicationContext)at exactly this point.The two implementations were compared line by line before swapping, not assumed equivalent. Normalising fully-qualified prefixes and the logger's local name, every observable matches: logger name
"org.eclipse.jetty.server.RequestLog", theisInfoEnabledguard, the same access-log format string, url pattern"/*", andEnumSet.allOf(classOf[DispatcherType]). The inline copy also sat immediately afterRoleAnnotationEnforcer.enforce, which is exactly where the siblings place theregistercall — so this is a body-only replacement.2. Four sites now use
SqlStates.UNIQUE_VIOLATIONinstead of the literal"23505".PveResource.scala:110,:148e.sqlState() == "23505"NotebookMigrationResource.scala:404e.sqlState == "23505"JupyterProvisioner.scala:168e.sqlState == "23505"Both modules can already see
common/dao:NotebookMigrationServicehas a direct DAO dependency, and amber reaches it transitively (Auth → DAO, andWorkflowCompiler → WorkflowOperator → WorkflowCore → DAO). No build change was needed. The constant was already in use byExternalAuthProvisioner,LocalAuthProvisionerandResourceNaming.The remaining
23505occurrences are CSV test fixtures, ayarn.lockchecksum,SqlStates.scalaitself, and three comments that explain what the code means — those are left alone.amber's two inline copies are deliberately untouched
Worth recording so they are not "fixed" later: amber's remaining inline filters cannot use the shared one. They are
javax.servlet, because amber pins Jetty 9.4.20, whileRequestLoggingFilterisjakarta.servlet. Their existing TODO — replace once Dropwizard is upgraded — is accurate, and this PR does not touch them.Verification
Re-run on the branch after merging
main:WorkflowCompilingService/test: 5 suites, 55 tests, 0 failures. This matters becauseWorkflowCompilingServiceRunSpechas cases asserting the filter's registration, its dispatch set, and that it forwards the request while logging one access line. They read the filter back out of the capturedFilterHolderrather than by class, so they survived the swap unchanged — and they are what confirms the shared filter behaves identically in place.NotebookMigrationService/test: 6 suites, 123 tests, 0 failures.NotebookMigrationResourceSpecdrives a real unique-constraint violation against embedded Postgres, and its "keep the winning row when two requests provision at once" case exercises theJupyterProvisionerrace path.PveResourceSpecfails the same 6 tests both with and without this change (45 succeeded / 6 failed / 1 canceled either way, verified by swapping inmain'sPveResource.scalaand re-running; identical failing set). All 6 arePveManagervenv/pip cases that are pre-existing on this machine; none touch the23505→ 409 paths.scalafmtCheckAllandscalafixAll --checkpass forWorkflowCompilingService,NotebookMigrationService,FileServiceandWorkflowExecutionService; no imports were left orphaned (FilterHolderremoved,RequestLoggingFilteradded).Any related issues, documentation, discussions?
Closes #7792
How was this PR tested?
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)