sivakumar-mahalingam opened a new pull request, #4463:
URL: https://github.com/apache/amoro/pull/4463

   ## Why are the changes needed?
   
   `OverviewManager` stores the top-table cache in a shared mutable 
`ArrayList`. The background refresh thread updates this list using separate 
`clear()` and `addAll()` operations while HTTP request threads may read it.
   
   As a result, a request can observe an empty or inconsistent intermediate 
cache state during a refresh. The cache should instead publish complete 
snapshots atomically so readers always receive either the previous snapshot or 
the newly refreshed snapshot.
   
   Close #4462.
   
   ## Brief change log
   
   - Replace the mutable top-table cache with a volatile immutable snapshot.
   - Build the complete snapshot before publishing it with a single assignment.
   - Return the published immutable snapshot directly to readers.
   - Add a regression test covering snapshot immutability and replacement 
during refresh.
   
   ## How was this patch tested?
   
   - [x] Added a regression test in `TestOverviewManager` that verifies the 
snapshot remains stable between refreshes and is replaced after a refresh.
   
   - [x] Screenshots are not applicable because this change does not affect the 
UI.
   
   - [x] Ran the targeted test locally:
   
     ```shell
     ./mvnw -pl amoro-ams -am -Pskip-dashboard-build \
       -Dtest=TestOverviewManager \
       -Dsurefire.failIfNoSpecifiedTests=false test
     ```
   
     Result: 2 tests passed with no failures, errors, or skips.
   
   - [x] Ran repository validation locally:
   
     ```shell
     ./mvnw validate
     ```
   
     Result: all 33 modules passed Spotless and Checkstyle validation.


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