danny0405 commented on PR #6324:
URL: https://github.com/apache/hudi/pull/6324#issuecomment-1208843496

   > > If the end commit is active and is used as the filtering instant for 
scan, shouldn't `getLatestFileSliceBeforeOrOn` work here ?
   > 
   > yes, it works, but it can't handle the condition when end commit is 
archived, if we use `getLatestFileSliceBeforeOrOn`, it may be a savepoint or 
just no fileSlice(be cleaned), thus not right, `getLatestFileSliceAfterOrOn` 
can hande it.
   > 
   > if the end commit is active, `getLatestFileSliceAfterOrOn` may get the 
right fileSlice or the next fileSlice.
   > 
   > if `getLatestFileSliceAfterOrOn` not found a fileSlice, we must then 
search before/reverse, as it may have a fileSlice before which is in the 
incremental query range(it must be the latest fileSlice in this fileGroup), we 
should judge if this fileSlice is before the read.start-commit, if it is, we 
skip this fileSlice, otherwise we use this fileSlice to search. so why 
`getLatestFileSliceAfterOrOnThenBefore`
   
   In general, let's not make things complex here, the only right way for 
multi-versioning is the timeline instant, one instant has its counterpart fs 
view, we should not dig into file slices for different version for one snapshot 
query even though there is performance gain.
   
   If start/end commit are both archived, very probably they are cleaned also, 
we have 2 choices here
   1. read the save point commit if there is with greater timestamp
   2. read the latest commit
   
   If start commit is archived but end commit is active, there is also 
possibility that the active instants with smaller timestamp that end commit is 
cleaned, we should check that first before we use the end commit as the fs view 
version filtering condition, that makes the thing more complex too.
   
   So, i would -1 if this is only a promotion not a bug fix.
   


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