Skip to content

Liem/java25 gradle9 migration#3

Open
liem18112000-axon wants to merge 35 commits into
mainfrom
liem/java25-gradle9-migration
Open

Liem/java25 gradle9 migration#3
liem18112000-axon wants to merge 35 commits into
mainfrom
liem/java25-gradle9-migration

Conversation

@liem18112000-axon

Copy link
Copy Markdown
Collaborator

New devops-script/docker-leocdp/ runs the admin worker + ArangoDB + Redis from the published image. The image ships only the JARs (no configs/metadata), so the bundle mounts a runtime config set over /app and injects ArangoDB creds via ARANGODB_* env (mainDatabaseConfig=SYSTEM_ENV_VARS). Container-specific tweaks: routing host 0.0.0.0, redis -> redis:6379. Verified: admin serves HTTP 200 on / /login /ping at :9070. .env is gitignored; copy sample.env. README documents steps + the JourneyMap seeder bug (setup exits 1 but creates admin/collections).
- Add Java 25 / Gradle 9 migration plan (docs/00-05) + progress report
- Add Gradle wrapper pinned at current 6.9.4 (un-ignore gradlew/gradle/*)
- Capture Gradle 6.9.4 + JDK 11 baseline artifacts for gate G1
  (docs/migration-baseline/, bytecode major 55 verified)
…ent attribute

- Wrapper 6.9.4 -> 7.6.4
- Remove 'maven' plugin (removed in Gradle 7) and dead uploadArchives block
- Replace String-typed org.gradle.jvm.environment attribute with the
  built-in typed TargetJvmEnvironment (String form collides on Gradle 7+)
- Build green: AutoBuildForDeployment, only remaining deprecation is
  baseName (fixed in next step)
- Wrapper 7.6.4 -> 8.14.3
- baseName -> archiveBaseName in all 5 starter Jar tasks
- ${buildDir} -> layout.buildDirectory for default output paths
- Build green; remaining Gradle-9 deprecations: space-assignment
  syntax (group/url) and JavaPluginConvention via sourceCompatibility
- Wrapper 8.14.3 -> 9.1.0 (9.1+ required for Java 25 support)
- options.release=11: Java 11 bytecode regardless of daemon JDK (verified major 55)
- minify plugin 1.3.2 -> 2.1.1; group/url assignment syntax; java.time timestamp
- Class-Path manifest resolved at execution time (doFirst) instead of config time
- CopyDevOpsScriptToBUILD: config-time copy{} bug fixed (proper Copy spec)
- Main-Class manifest values trimmed (legacy leading space)
- configurations attribute pin gated to resolvable configs (Gradle 9 roles)
- G1: output tree + deps identical to 6.9.4 baseline; starter boots on JDK 11
  and JDK 25; 4 minified JS files differ (Closure bump) - QA before CDN push
- devops-script/shell-script-starter/jvm-params.sh: shared JAVA25_COMPAT_FLAGS
  (JEP 498 Unsafe allow, JEP 472 native access, Netty/Gson add-opens);
  sourced by start-admin/start-observer/start-data-connector-jobs;
  obsolete -server/-XX:+TieredCompilation/-XX:+UseCompressedOops dropped
- Dockerfile: build+runtime stages on amazoncorretto:25, gradlew wrapper
  replaces manual Gradle install, flags via JDK_JAVA_OPTIONS
- ci-cd.yml: JDK 25 + wrapper; new guard step asserts bytecode major 55
- build.sh: ./gradlew
- Boot smoke: leo-main-starter verified on JDK 11 and JDK 25 locally
Staging soak (gate G2) remains blocked on environment - see MIGRATION-PROGRESS.md
(generated by the 9.1.0 wrapper task; belongs with Phase 1c)
…G2-local results

- Dockerfile: yum install findutils (gradlew needs xargs; AL2023 corretto
  image ships without it - issue I5)
- R6 QA: tracker leo.observer.min.js byte-identical; 4 admin JS diffs
  collapse to 2 equivalent lines after CR normalization; parse-clean
- G2-local: jdk25-local image built end-to-end, leocdp-admin swapped to
  Corretto 25.0.3 - flags picked up, zero JDK-25 failure signatures,
  Vert.x/Netty serving, login UI console identical to Corretto-11 baseline
- New tests_with_k6/admin_http_ab_test.js: 50VU/80s against the admin
  worker's login HTML + the 4 migration-changed JS assets
- Warm-vs-warm, zero errors both sides; raw summaries in tests_with_k6/out/
- Netty PlatformDependent on JDK 25 reports hasUnsafe=true and
  directBufferPreferred=true (jshell probe), so not a crude Unsafe fallback
- Outside the gate's +/-10%: needs repeat runs to rule out env noise, then
  contingency ladder step 2 (Vert.x 3.9.16) if persistent - see
  MIGRATION-PROGRESS.md
- docs/MIGRATION-EXECUTION-REPORT.md: full narrative - per-commit changes,
  flag rationale, G1 evidence, R6 verdict, G2-local results, issues I1-I6,
  remaining staging/prod work, rollback procedures, artifact inventory
- k6 interleaved 3-round x 2-side protocol (150s steady, ~210k reqs, 0 errors):
  same-side variance +/-40pct dwarfs any JDK delta; medians favor JDK 25
  (422.7 vs 383.4 rps, p95 303 vs 355 ms) -> initial single-run regression
  reclassified as host noise (I6); precise +/-10pct gate moves to staging
- admin_http_ab_test.js: STEADY env param for longer steady-state runs
…22% p95)

- Interleaved 3-round protocol, quieter host (same-side spread 5-8%)
- Medians: 504.5 vs 470.2 rps; p95 144 vs 184 ms; 0 errors
- COH verified active via jcmd; flag is JDK-25-only (structural advantage)
- Two independent batches now lean JDK 25 faster; memory-per-variant
  measurement in flight (report section 7.2 placeholder)
…MiB)

- Identical app, bytecode, and 1200-request load; docker stats RSS
- COH neutral at this live-set size (297 MiB) - judge on data pipeline
- Report section 7.2 + 7.3 final perf verdict: JDK 25 >= JDK 11 on every
  locally measured axis (throughput, p95, memory, errors)
- All 16 k6 runs (1,011,155 requests) with full latency stats per run
- Protocol evolution documented: single-run false regression -> interleaved
  rounds -> COH batch; variance analysis (same-side spread up to 40pct)
- Memory study: JDK 25 RSS 289.2 vs 412.7 MiB on JDK 11 (-30pct), COH neutral
  at small live-set; conclusions + threats-to-validity + reproduction steps
- docs/06-java25-code-modernization-plan.md: wave plan for records/idioms/
  virtual threads with record-conversion triage matrix (Gson<2.10, ArangoDB
  driver-6 VPACK, handlebars getter resolution = no-go boundaries)
- options.release 11 -> 25; compile green, MainHttpStarter verified major 69
- CI bytecode guard 55 -> 69
- Branch artifacts now require Java 25 runtime; last bc-55 state: d64612b
- Same source, same Corretto 25, only options.release differs (11 vs 25)
- bc69 won 3/3 rounds: medians +8.3% rps (493.5 vs 455.5), -23% median
  latency (68.5 vs 88.6 ms), -7% p95; memory parity (287 MiB both)
- Perf report section 5 batch 3 + conclusion 6 added; progress tracker
  Wave 0 row marked done (branch); raw summaries round*-bc{55,69}.json
89 files, +241/-197, behavior-preserving only:
- instanceof pattern matching (binding vars replace casts)
- List.get(0)/get(size-1) -> getFirst()/getLast() (SequencedCollection)
- unused variables -> unnamed _
- text blocks for inline AQL/JSON strings
- Paths.get -> Path.of; @serial annotations; extra semicolons removed

Rejected from the UpgradeToJava25 composite (see rewrite-init.gradle):
MigrateMainMethodToInstanceMain (starter main() reflection risk),
ReplaceSystemOutWithIOPrint (churn), UpdateGradleWrapper (pinned).

Gates: compileJava+compileTestJava green on release=25, major 69 verified,
leo-main-starter boot smoke on JDK 25 OK (per docs/06 Wave 1 exit gate)
- Gson 2.9.1 -> 2.13.2 (2.10+ required for record serde; usage surface
  audited: only stable new Gson()/GsonBuilder API, no JsonParser/setLenient)
- SentimentAnalysisResult/Params -> records (Gson round-trip, same JSON shape)
- TouchpointFlowReportCacheKey -> record: component-based equality replaces
  hashed-string comparison (stronger - no collision risk, no derived field);
  Guava CacheLoader accessors updated
- Gates: compileJava+compileTestJava green, boot smoke on JDK 25 OK
- Dockerfile: pre-fetch Gradle distribution in its own retried layer
  (transient 'Premature EOF' from services.gradle.org hit two builds)
- jdk25-bc69 rebuilt with Waves 1+2a: boot scrub 0 failure signatures,
  Gson 2.13.2 in image, login UI console identical to baseline
- k6 sanity: 403.4 rps / p95 312 ms / 0 errors in 68,655 reqs (in-band)
…t fan-outs

Wave 2b (record reviews per docs/06 triage):
- ProductImportingEvent -> record (internal queue carrier, no serde)
- Reviewed and kept as classes: JsonErrorPayload (constants holder),
  RelationshipType (mutable, persisted graph model), SegmentRef (VPACK),
  AccessTokenUtil (util) - triage matrix held

Wave 3a (virtual threads, per-run blocking fan-outs only):
- JobCsvExportForSegment / JobExcelExportForSegment /
  JobGoogleSheetExportForSegment: fixed pools -> newVirtualThreadPerTaskExecutor
- SegmentQueryManagement: 2-task parallel AQL + export fan-out -> VT
- NOT converted: newSingleThreadExecutor sites (ordering semantics) and
  static shared pools (load-shaping; needs load test) - rationale in docs/06

Gates: compile main+test green (release=25), boot smoke on JDK 25 OK
…timeout

- The retried gradlew-distribution layer was ordered after COPY . ., so any
  source change invalidated its cache and re-paid the flaky download;
  wrapper files are now copied first (manifest-first layer ordering)
- gradle-wrapper.properties networkTimeout 10000 -> 60000 (default 10s is
  what trips first on this network path)
git mode 100644 -> 100755. The Linux runner checked out a non-executable
gradlew, so the Dockerfile's RUN ./gradlew failed (Permission denied) in the
docker job. Local Windows docker builds masked it: buildx assigns 0755 to
files copied from a Windows context.
Root cause chain (all surfaced by Gradle 9, not regressions):
- Gradle 9 failOnNoDiscoveredTests failed :test because the project never
  called useJUnitPlatform() -> added it + junit-platform-launcher:1.10.3
  (must be version-pinned; no junit-bom in this build)
- Once discovered, 47/59 tests failed: integration probes that statically
  init Profile/PersistentObject (read leocdp-metadata.properties, open
  ArangoDB/Redis at class-load) - NoClassDefFoundError without live infra
  (documented behavior, CLAUDE.md)
- Default :test now runs the infra-free UNIT subset (12 tests, green);
  full set via new integrationTest task against a live stack
  (resolves the unit/integration split TODO in docs/05)
- jdbi findOnly() (removal-deprecated) -> one() in DatabaseManager
- integrationTest task now forwards ARANGODB_{HOST,PORT,USERNAME,PASSWORD,
  DATABASE} from the environment (no creds in build) and runs in projectDir
  so SystemMetaData finds leocdp-metadata.properties + configs/
- Validated against the live local ArangoDB stack: 40/59 pass on the
  modernized JDK-25/bytecode-69 build (records, Gson 2.13.2, virtual threads).
  The 19 failures are un-seeded test data, Redis pub/sub timing, and a
  pre-existing non-static @BeforeAll bug - none migration-related
- Local-only config (metadata, database-configs.json) stays gitignored
Non-static @BeforeAll threw JUnitException at discovery, counting each class
as 1 failure AND hiding its @test methods. Dormant for years (suite never
ran pre-useJUnitPlatform). After fix, methods actually execute against the
live DB: TestPostDataUtil now 5/5 green; TestCategoryDataUtil/SearchAndQuery
now run and fail only on un-seeded data (bucket 1, not lifecycle).
…ion runs

JavaExec runner for DataSampleSetup -> JourneyFlowSchema.init(), same
env/workingDir convention as integrationTest. Seeding the default data flow
stages resolves the ProfileMergeServiceTest NPE cluster (reads
DataFlowManagement.getCustomerFunnelStages()).

Integration status against live ArangoDB (modernized JDK-25/bc69 build):
- clean seeded state: 59/66 pass
- remaining 7: per-test fixtures (TestNotification user, category/content
  data) + Redis pub/sub timing - pre-existing test-design gaps, not migration
…ation user

- TestCategoryDataUtil / TestUserDataUtil: add @TestMethodOrder(OrderAnnotation)
  so @order takes effect (create-before-read sequence; without it methods ran
  in arbitrary order and read before the save method populated state)
- TestNotification: self-seed its SystemUser in @BeforeAll and use the real
  Arango _key instead of the stale hard-coded '178861' (auto-assigned keys
  can't match a fixed literal); delete in @afterall for idempotent re-runs
- Compile-verified (compileTestJava green); integration re-run pending the
  local Docker engine (Rancher Desktop) being back up
- deleteIfExists() guards the @BeforeAll/@afterall cleanup (the DAO delete
  throws InvalidDataException on an absent user rather than no-op'ing)
- Build the notification with the 'type' key the Notification(JsonObject)
  ctor actually reads (was 'status'); assertion wanted getType()=='test'
- Verified 1/1 green against live ArangoDB on the JDK-25/bc69 build
…ediation task

Migration validated (unit 12/12, CI green, all migration-sensitive DB paths
green at 59-60/66). Remaining 6 failures are pre-existing test defects
(null DAO save, missing teardown/409, unsatisfiable >=10 assertion, hardcoded
IDs, Redis timing) - separate from the JDK-25/Gradle-9 migration. Also
gitignore .playwright-mcp transient artifacts.
@liem18112000-axon

Copy link
Copy Markdown
Collaborator Author

Anh @trieu khoan merge cái này nhe anh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates core-leo-cdp to a Java 25 + Gradle 9 toolchain and modernizes the codebase to newer Java idioms (records, text blocks, Path.of, sequenced collection APIs, unnamed variables), while also updating CI/Docker/devops scripts and adding baseline/performance evidence to support the migration gates described in the docs.

Changes:

  • Upgrade build/runtime environment (Gradle wrapper 9.1.0, Corretto 25 in CI/Docker, updated build scripts).
  • Apply large-scale Java modernization (records, getFirst/getLast, text blocks, Path.of, @Serial, pattern matching, virtual threads for export/query fan-out).
  • Add/commit migration documentation, baseline capture artifacts, and k6 A/B test harness + raw outputs.

Reviewed changes

Copilot reviewed 151 out of 178 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests_with_k6/out/round3-jdk25coh.json k6 summary output (round 3, JDK 25 variant) used as performance evidence.
tests_with_k6/out/round3-jdk25.json k6 summary output (round 3, JDK 25).
tests_with_k6/out/round3-jdk11.json k6 summary output (round 3, JDK 11 baseline).
tests_with_k6/out/round3-bc69.json k6 summary output (round 3, bytecode 69).
tests_with_k6/out/round3-bc55.json k6 summary output (round 3, bytecode 55).
tests_with_k6/out/round2-jdk25.json k6 summary output (round 2, JDK 25).
tests_with_k6/out/round2-jdk11.json k6 summary output (round 2, JDK 11).
tests_with_k6/out/round2-bc69.json k6 summary output (round 2, bytecode 69).
tests_with_k6/out/round2-bc55.json k6 summary output (round 2, bytecode 55).
tests_with_k6/out/round1-jdk25.json k6 summary output (round 1, JDK 25).
tests_with_k6/out/round1-jdk11b.json k6 summary output (round 1, JDK 11 variant).
tests_with_k6/out/round1-bc55.json k6 summary output (round 1, bytecode 55).
tests_with_k6/out/jdk25.json k6 summary output (JDK 25 run).
tests_with_k6/out/jdk25-warm.json k6 summary output (JDK 25 warm run).
tests_with_k6/out/jdk11.json k6 summary output (JDK 11 run).
tests_with_k6/out/consolidated-bc69-waves.json Consolidated k6 summary output (bytecode 69 waves).
tests_with_k6/admin_http_ab_test.js k6 A/B smoke script for admin HTTP surface during migration.
core-leo-cdp/src/test/java/test/util/TestQueue.java Test/util modernization (unnamed catch variable).
core-leo-cdp/src/test/java/test/util/RedisPubSubClientTest.java Test/util modernization (unnamed catch variable).
core-leo-cdp/src/test/java/test/util/ImageConverter.java Use Path.of and remove Paths import.
core-leo-cdp/src/test/java/test/revenue_test/TimestampDeserializer.java Unnamed catch variable modernization.
core-leo-cdp/src/test/java/test/persistence/util/TestUserDataUtil.java Fix JUnit ordering by adding @TestMethodOrder.
core-leo-cdp/src/test/java/test/persistence/util/TestSearchAndQueryContent.java JUnit @BeforeAll/@AfterAll made static; unnamed loop var.
core-leo-cdp/src/test/java/test/persistence/util/TestPostDataUtil.java JUnit @BeforeAll/@AfterAll made static.
core-leo-cdp/src/test/java/test/persistence/util/TestCategoryDataUtil.java Enforce test order + static lifecycle methods.
core-leo-cdp/src/test/java/test/persistence/util/TestAssetGroupDataUtil.java Use getFirst() to align with sequenced collections.
core-leo-cdp/src/test/java/test/persistence/util/SetupBlogpostData.java Replace string concatenation with text block.
core-leo-cdp/src/test/java/test/notification/TestNotification.java Make notification test self-seeding and use getFirst().
core-leo-cdp/src/test/java/test/kafka/KafkaTopicPrinter.java Unnamed catch variable modernization.
core-leo-cdp/src/test/java/test/jdbi/DatabaseManager.java Text blocks for SQL, Jdbi API update (one()), unnamed mapper arg.
core-leo-cdp/src/test/java/test/cdp/segment/CrudSegmentTest.java Replace JSON string concatenation with text block.
core-leo-cdp/src/test/java/test/cdp/report/TouchpointManagementTest.java Use getFirst() for list access.
core-leo-cdp/src/test/java/test/cdp/query/TestCustomQueryValidation.java Replace multi-line strings with text blocks.
core-leo-cdp/src/test/java/test/cdp/query/QueryParserTest.java Replace JSON string concatenation with text block.
core-leo-cdp/src/test/java/test/automation/TestOnMacOs.java Unnamed catch variable modernization.
core-leo-cdp/src/test/java/test/automation/PrerollTVC.java Unnamed catch variable modernization.
core-leo-cdp/src/main/java/leotech/web/handler/delivery/CreativeContentWebHandler.java Use sequenced collection getFirst() for first element access.
core-leo-cdp/src/main/java/leotech/system/version/SystemMetaData.java Use Path.of instead of Paths.get.
core-leo-cdp/src/main/java/leotech/system/util/XssFilterUtil.java Unnamed catch variables.
core-leo-cdp/src/main/java/leotech/system/util/TokenUtil.java Use getFirst() for list access; unnamed catch variables.
core-leo-cdp/src/main/java/leotech/system/util/media/TextSummarizer.java Lambda unnamed variables; counting logic touched.
core-leo-cdp/src/main/java/leotech/system/util/media/ImageOptimizer.java Use Path.of instead of Paths.get.
core-leo-cdp/src/main/java/leotech/system/util/keycloak/KeycloakUtils.java Unnamed catch variables.
core-leo-cdp/src/main/java/leotech/system/util/keycloak/KeycloakClientSsoRouter.java Cleanup builder chain formatting around HTTPS options.
core-leo-cdp/src/main/java/leotech/system/util/keycloak/AuthKeycloakHandlers.java Unnamed lambda/catch vars; getFirst() for query params.
core-leo-cdp/src/main/java/leotech/system/util/IpToLocationService.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/system/util/HttpWebParamUtil.java instanceof pattern matching; unnamed catch variables.
core-leo-cdp/src/main/java/leotech/system/util/GoogleStorageUtil.java Use Path.of for file reads.
core-leo-cdp/src/main/java/leotech/system/util/GeoLocationUtil.java Use getFirst() for first element access.
core-leo-cdp/src/main/java/leotech/system/util/database/InitDatabaseSchema.java Use Path.of for required directories.
core-leo-cdp/src/main/java/leotech/system/util/database/ArangoDbCommand.java instanceof pattern matching; unnamed catch vars.
core-leo-cdp/src/main/java/leotech/system/template/MustacheServiceModel.java Add @Serial on serialVersionUID.
core-leo-cdp/src/main/java/leotech/system/template/HandlebarsHelpers.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/system/model/LeoCdpLicense.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/system/model/CsvDataParser.java Use getFirst() for header row selection.
core-leo-cdp/src/main/java/leotech/system/exception/InvalidSystemException.java Add @Serial on serialVersionUID.
core-leo-cdp/src/main/java/leotech/system/exception/InvalidDataException.java Add @Serial on serialVersionUID.
core-leo-cdp/src/main/java/leotech/system/domain/AirflowService.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/system/dao/SystemEventDaoUtil.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/system/config/DatabaseConfigs.java Add @Serial; unnamed catch variable.
core-leo-cdp/src/main/java/leotech/system/common/SecuredHttpDataHandler.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/system/common/PublicFileHttpRouter.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/starter/router/MainHttpRouter.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/query/util/ContentQuery.java Add @Serial on serialVersionUID.
core-leo-cdp/src/main/java/leotech/cdp/utils/ProfileDataValidator.java Unnamed catch variables.
core-leo-cdp/src/main/java/leotech/cdp/utils/GoogleSheetUtils.java Use getFirst() for range calculation.
core-leo-cdp/src/main/java/leotech/cdp/query/ProfileQueryBuilder.java Convert query string constants to text blocks.
core-leo-cdp/src/main/java/leotech/cdp/query/ProfileMatchingResult.java Use getFirst() and remove extra semicolon.
core-leo-cdp/src/main/java/leotech/cdp/model/marketing/Scenario.java Add @Serial on serialVersionUID.
core-leo-cdp/src/main/java/leotech/cdp/model/customer/ProfileModelUtil.java Unnamed catch variables in date parsing/formatting.
core-leo-cdp/src/main/java/leotech/cdp/model/customer/AbstractProfile.java Remove extra semicolons; unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/model/analytics/TrackingEvent.java Remove extra semicolon.
core-leo-cdp/src/main/java/leotech/cdp/model/analytics/OrderTransaction.java Remove extra semicolon.
core-leo-cdp/src/main/java/leotech/cdp/model/analytics/JourneyProfileReport.java Use getFirst() for list access.
core-leo-cdp/src/main/java/leotech/cdp/model/analytics/EventPayload.java Unnamed catch variables for decode error handling.
core-leo-cdp/src/main/java/leotech/cdp/model/analytics/DailyReportUnit.java Unnamed lambda variables in computeIfAbsent.
core-leo-cdp/src/main/java/leotech/cdp/model/analytics/CytoscapeData.java Use getFirst() for root node selection.
core-leo-cdp/src/main/java/leotech/cdp/model/activation/Agent.java Add @Serial on serialVersionUID and formatting cleanup.
core-leo-cdp/src/main/java/leotech/cdp/model/activation/ActivationRuleJobRunner.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/model/activation/ActivationRule.java Add @Serial; equals uses pattern matching.
core-leo-cdp/src/main/java/leotech/cdp/job/scheduled/CdpProductImportingJob.java Replace event class with record; update accessors.
core-leo-cdp/src/main/java/leotech/cdp/job/reactive/JobSentimentAnalysis.java Replace payload/response POJOs with records.
core-leo-cdp/src/main/java/leotech/cdp/job/reactive/JobGoogleSheetExportForSegment.java Switch Sheets export fan-out to virtual threads.
core-leo-cdp/src/main/java/leotech/cdp/job/reactive/JobExcelExportForSegment.java Switch Excel export fan-out to virtual threads; Path.of.
core-leo-cdp/src/main/java/leotech/cdp/job/reactive/JobCsvExportForSegment.java Switch CSV export fan-out to virtual threads.
core-leo-cdp/src/main/java/leotech/cdp/handler/ObserverHttpPostHandler.java Use getFirst() for first event selection.
core-leo-cdp/src/main/java/leotech/cdp/handler/admin/JourneyMapHandler.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/handler/admin/AssetItemHandler.java Remove extra semicolon.
core-leo-cdp/src/main/java/leotech/cdp/domain/TouchpointManagement.java Replace cache key class with record; update cache accessors.
core-leo-cdp/src/main/java/leotech/cdp/domain/TouchpointHubManagement.java Unnamed catch variables.
core-leo-cdp/src/main/java/leotech/cdp/domain/SegmentQueryManagement.java Switch query/export fan-outs to virtual threads.
core-leo-cdp/src/main/java/leotech/cdp/domain/SegmentDataManagement.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/domain/scoring/DataQualityScoreUtil.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/domain/scoring/ComputeProfileCLV.java Use getLast() for last purchase selection.
core-leo-cdp/src/main/java/leotech/cdp/domain/ProfileQueryManagement.java Use getFirst() for DAO results.
core-leo-cdp/src/main/java/leotech/cdp/domain/ProfileGraphManagement.java Unnamed exception variable in cache get.
core-leo-cdp/src/main/java/leotech/cdp/domain/ProfileDataManagement.java Remove stray semicolon; use getFirst() for last event.
core-leo-cdp/src/main/java/leotech/cdp/domain/ProductItemManagement.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/domain/JourneyMapManagement.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/domain/IdentityResolutionManagement.java Use getFirst/removeFirst() for merge target selection.
core-leo-cdp/src/main/java/leotech/cdp/domain/FeedbackDataManagement.java Use getFirst() for header result selection.
core-leo-cdp/src/main/java/leotech/cdp/domain/EventMetricManagement.java Unnamed lambda variable in cache init.
core-leo-cdp/src/main/java/leotech/cdp/domain/EmailFlowManagement.java Use getFirst() for recommended product selection.
core-leo-cdp/src/main/java/leotech/cdp/domain/DeviceManagement.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/domain/ContextSessionManagement.java Use getFirst() for session selection.
core-leo-cdp/src/main/java/leotech/cdp/domain/CampaignManagement.java Unnamed lambda variable for segment processing placeholder.
core-leo-cdp/src/main/java/leotech/cdp/domain/cache/AdminRedisCacheUtil.java instanceof pattern matching for byte[] decoding.
core-leo-cdp/src/main/java/leotech/cdp/domain/Analytics360Management.java Unnamed catch variables.
core-leo-cdp/src/main/java/leotech/cdp/dao/TrackingEventDao.java Use getFirst() for last event selection.
core-leo-cdp/src/main/java/leotech/cdp/dao/SegmentDaoUtil.java Unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/dao/EventObserverDaoUtil.java Use getFirst() for default observer selection.
core-leo-cdp/src/main/java/leotech/cdp/dao/ContentQueryDaoUtil.java Use getFirst() and unnamed catch variable.
core-leo-cdp/src/main/java/leotech/cdp/dao/AssetProductItemDaoUtil.java Replace AQL concatenation with text block.
core-leo-cdp/rewrite-init.gradle Add OpenRewrite init script for curated mechanical migrations.
core-leo-cdp/gradlew.bat Add committed Gradle wrapper Windows launcher.
core-leo-cdp/gradle/wrapper/gradle-wrapper.properties Configure Gradle wrapper distribution (9.1.0).
core-leo-cdp/docs/migration-baseline/gradle9-js-sha256.txt Migration baseline artifact (Gradle 9 JS checksums).
core-leo-cdp/docs/migration-baseline/gradle9-js-sha256-noversion.txt Baseline artifact excluding volatile version lines.
core-leo-cdp/docs/migration-baseline/gradle9-bytecode.txt Baseline artifact for bytecode major version.
core-leo-cdp/docs/migration-baseline/gradle694-js-sha256.txt Baseline artifact (Gradle 6.9.4 JS checksums).
core-leo-cdp/docs/migration-baseline/gradle694-js-sha256-noversion.txt Baseline artifact excluding volatile version lines.
core-leo-cdp/docs/migration-baseline/gradle694-bytecode.txt Baseline artifact for bytecode major version.
core-leo-cdp/docs/migration-baseline/capture-baseline.sh Script to capture baseline artifacts for migration gates.
core-leo-cdp/docs/BRANCH-CHANGE-REPORT.md High-level migration report and KPI summary for the branch.
core-leo-cdp/docs/05-testing-and-rollout-plan.md Testing/rollout plan and gate definitions for migration.
core-leo-cdp/docs/04-runtime-and-deployment-changes.md Runtime/Docker/CI/devops change plan for the migration.
core-leo-cdp/Dockerfile Move build/runtime images to Corretto 25; use wrapper; set compat flags.
core-leo-cdp/devops-script/shell-script-starter/start-observer.sh Update JVM flags; source shared JDK 25 compat flags.
core-leo-cdp/devops-script/shell-script-starter/start-data-connector-jobs.sh Update JVM flags; source shared JDK 25 compat flags.
core-leo-cdp/devops-script/shell-script-starter/start-admin.sh Update JVM flags; source shared JDK 25 compat flags.
core-leo-cdp/devops-script/shell-script-starter/jvm-params.sh New shared JDK 25 compatibility flag bundle for starters.
core-leo-cdp/devops-script/docker-leocdp/sample.env Provide sample env for docker-compose runtime configuration.
core-leo-cdp/devops-script/docker-leocdp/README.md Add docker-compose usage guide for GHCR image.
core-leo-cdp/devops-script/docker-leocdp/docker-compose.yml Add compose stack for admin + ArangoDB + Redis.
core-leo-cdp/devops-script/docker-leocdp/configs/scheduled-jobs-configs.json Docker runtime scheduled jobs config sample.
core-leo-cdp/devops-script/docker-leocdp/configs/redis-connection-pool-configs.json Docker runtime Redis pool config sample.
core-leo-cdp/devops-script/docker-leocdp/configs/redis-configs.json Docker runtime Redis endpoints config sample.
core-leo-cdp/devops-script/docker-leocdp/configs/README.md Placeholder readme for docker runtime configs folder.
core-leo-cdp/devops-script/docker-leocdp/configs/PRO-database-configs.json Minimal DB config placeholder (env-driven creds).
core-leo-cdp/devops-script/docker-leocdp/configs/log4j.xml Container-focused log4j config.
core-leo-cdp/devops-script/docker-leocdp/configs/kafka-producer.properties Kafka producer config sample for docker runtime.
core-leo-cdp/devops-script/docker-leocdp/configs/kafka-consumer.properties Kafka consumer config sample for docker runtime.
core-leo-cdp/devops-script/docker-leocdp/configs/http-routing-configs.json Container-friendly routing config (bind 0.0.0.0).
core-leo-cdp/devops-script/docker-leocdp/configs/database-configs.json Minimal DB config placeholder (env-driven creds).
core-leo-cdp/devops-script/docker-leocdp/configs/data-mapper/README.md Data mapper config folder documentation.
core-leo-cdp/devops-script/docker-leocdp/configs/data-mapper/profile-data-mapper.json Data mapper config content for docker runtime.
core-leo-cdp/devops-script/docker-leocdp/configs/app-metadata-configs.json App metadata config sample for docker runtime.
core-leo-cdp/devops-script/docker-leocdp/.gitignore Ignore local .env for docker runtime.
core-leo-cdp/build.sh Switch build script to use committed wrapper (./gradlew).
core-leo-cdp/.gitignore Ensure wrapper JAR is not ignored.
.gitignore Stop ignoring wrapper scripts; ignore Playwright MCP transient artifacts.
.github/workflows/ci-cd.yml Update CI to Corretto 25 + wrapper; add bytecode major-version guard.
Comments suppressed due to low confidence (1)

core-leo-cdp/src/main/java/leotech/cdp/job/reactive/JobExcelExportForSegment.java:178

  • If an exception occurs, the executor may never be shut down (the generic catch (Exception e) path returns without shutdown*()), and the finally block calls awaitTermination without initiating shutdown, which can add a 60s delay and/or leak threads. Ensure the executor is always shut down in all paths before waiting for termination.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 50 to 54
for (String s : words) {
if (countMap.get(s) != null)
countMap.compute(s, (k, v) -> v++);
countMap.compute(s, (_, v) -> v++);
else
countMap.put(s, 0);
Comment on lines +121 to 124
// Wave 3 (docs/06): virtual threads for the blocking Sheets-API fan-out
ExecutorService writeSheetService = Executors.newVirtualThreadPerTaskExecutor();
CompletionService<List<List<Object>>> completionService = new ExecutorCompletionService<>(writeSheetService);

Comment on lines +4 to +10
initscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies { classpath("org.openrewrite:plugin:latest.release") }
}
Comment on lines +309 to 312
// Wave 3 (docs/06): virtual threads for the blocking-read export fan-out
ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();
List<Future<String>> futures = new ArrayList<>();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants