vamshipasunuru1 commented on issue #20650:
URL: https://github.com/apache/hudi/issues/20650#issuecomment-7141761843

   @danny0405 thanks. You are right about the rollback case. The three guards 
accept it, because guard 2 looks only at pending write instants. I agree with 
your direction: the server does not try to prove archival, and the client lists 
the files locally.
   
   I updated #20651 with this approach, with one change to rule 2. The server 
syncs one time for a client timeline before it rejects without a sync:
   
   - A `REMOTE_FIRST` client sends `localfallback=true`.
   - When the timelines differ, the server syncs, as it does today. If they 
still differ after the sync, the server keeps the client timeline hash. It 
rejects the next requests that have this hash with HTTP 400 and without a sync.
   - A client without the flag uses the existing path.
   
   Why one sync first: with "same last instant, no sync", a warm server that is 
behind the client stays behind for the full write. This is the late completion 
that you mentioned. It is also a server that loaded its view before an archival 
and a client that loaded its timeline after it. Today, one sync corrects these 
cases and the server answers the requests. With one sync first, that does not 
change, and the comparison of the last instants is not necessary. The rule also 
applies to a mismatch with different last instants, for example a commit of a 
different writer that completes before the server loads its view.
   
   On the incident trace, the result is one sync and one discarded listing. 
Then each task lists the files locally.
   
   The tests in `TestTimelineViewRefresh` use real files and assert the 
returned base files and the number of syncs:
   
   - Archival before the server load, 32 concurrent `REMOTE_FIRST` tasks: one 
sync (32 without the fix).
   - The same timeline with `REMOTE_ONLY` clients: one sync for each request, 
as today.
   - A new client timeline after an unmatched one: one more sync, and the 
server answers.
   - A late completion with the same last instant: one sync, and the server 
answers all the requests.
   


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