rishabhdaim commented on PR #2895:
URL: https://github.com/apache/jackrabbit-oak/pull/2895#issuecomment-5379376932

   ๐Ÿค– **AI-generated review** โ€” automated code review via GitHub Copilot CLI 
(change-reviewer). 10 lenses were dispatched (correctness, tests, consistency, 
compatibility, design, concurrency, spec-compliance, history, reversibility, 
performance); findings below are the subset that survived independent 
confidence verification against the current diff. Treat as input for human 
review, not a final verdict.
   
   Findings outside this diff:
   
   
`oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/api/CacheStatsSnapshot.java`
 (~line 124) โ€” ๐ŸŸ  **P2** ยท ๐Ÿงช Tests
   
   **๐Ÿ” Issue:** The new `plus()` method uses `Math.addExact` (throws 
`ArithmeticException` on overflow) replacing Guava's silently-wrapping `+`, but 
has zero test coverage even though it's used by 
`WriterCacheManager.accumulateRecordCacheStats` to accumulate long-lived JMX 
cache stats.
   
   **๐Ÿ› ๏ธ Fix:** Add a `CacheStatsSnapshotTest` case for `plus()`, including an 
overflow boundary case asserting the new `ArithmeticException`.
   
   `oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/CacheStats.java` 
(~line 1) โ€” ๐ŸŸ  **P2** ยท ๐Ÿ”— Consistency
   
   **๐Ÿ” Issue:** `PLAN.md`/`TASKS.md` document deprecating `CacheStats` 
(Guava-constructor) and keeping `CacheStatsAdapter` as canonical, but this PR 
does the opposite โ€” it deletes `CacheStatsAdapter` and keeps `CacheStats` as 
the surviving, non-deprecated class with no `@Deprecated` annotation added.
   
   **๐Ÿ› ๏ธ Fix:** Update `PLAN.md`/`TASKS.md` to reflect the chosen direction, or 
follow the documented plan instead.
   
   
`oak-core-spi/src/test/java/org/apache/jackrabbit/oak/cache/impl/CacheBuilderTest.java`
 (~line 236) โ€” ๐ŸŸก **P3** ยท ๐Ÿ”— Consistency
   
   **๐Ÿ” Issue:** The javadoc ("`CacheStatsAdapter` exposes stats...") and test 
method name `oakCacheStatsAdapterBridgesOakStats()` still reference the deleted 
`CacheStatsAdapter` class, even though the method body now constructs 
`CacheStats`.
   
   **๐Ÿ› ๏ธ Fix:** Update the javadoc and rename the test method to reference 
`CacheStats`.
   
   `oak-lucene/pom.xml` (~line 132) โ€” ๐Ÿ”ด **P1** ยท ๐Ÿ”„ Compatibility
   
   **๐Ÿ” Issue:** `Embed-Dependency` still inlines the deleted 
`CacheStatsAdapter.class` from `oak-core-spi`, and the renamed replacement 
`cache/api/CacheStats.class` is missing from the list entirely (the existing 
`CacheStats.class` entry is a different, unrelated package).
   
   **๐Ÿ’ฅ Impact:** The bnd inline path list references a class that no longer 
exists in the embedded jar, risking a build/packaging failure or a silently 
incomplete bundle that reintroduces the classloader-split `VerifyError` this 
entry was added to prevent.
   
   **๐Ÿ› ๏ธ Fix:** Remove 
`org/apache/jackrabbit/oak/cache/api/CacheStatsAdapter.class` and add 
`org/apache/jackrabbit/oak/cache/api/CacheStats.class` to the inline list, then 
re-verify `IndexVersionSelectionIT`.
   


-- 
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]

Reply via email to