jihoonson opened a new pull request #8222: Fix bugs in overshadowableManager 
and add unit tests
URL: https://github.com/apache/incubator-druid/pull/8222
 
 
   ### Description
   
   Several bugs are found in the overshadowableManager. It could happen in 
various cases, but it was essentially the contract of the `State` of the 
atomicUpdateGroup was not respected properly. I updated its javadoc as below:
   
   ```java
     /**
      * There are 3 states for atomicUpdateGroups.
      * There could be at most one visible atomicUpdateGroup at any time in a 
non-empty overshadowableManager.
      *
      * - Visible: fully available atomicUpdateGroup of the highest version if 
any.
      *            If there's no fully available atomicUpdateGroup, the standby 
atomicUpdateGroup of the highest version
      *            becomes visible.
      * - Standby: all atomicUpdateGroups of higher versions than that of the 
visible atomicUpdateGroup.
      * - Overshadowed: all atomicUpdateGroups of lower versions than that of 
the visible atomicUpdateGroup.
      */
   ```
   
   The overshadowableManager was not properly handling the case when there is 
no fully available group of the visible state.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [x] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to