You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2024/09/23 19:47:00 UTC

[PR] [HUDI-8242] Fixing Log Record reader to include rollback blocks with timestamps > maxInstant times [hudi]

nsivabalan opened a new pull request, #11990:
URL: https://github.com/apache/hudi/pull/11990

   ### Change Logs
   
   - Fix Log record reading with rollback blocks having higher timestamps compared to maxInstant configured. 
   
   ### Impact
   
   LogRecordReader takes in a maxInstant time beyond which log blocks are ignored. But w/ rollbacks, there are chances it could lead to data consistency issues. 
   
   Lets go through an illustration: 
   
   Say, we have t1.dc, t2.dc and t2.dc crashed mid way.  
   Current layout is, 
   ```
   base file(t1), lf1(partially committed data w/ t2 as instant time)
   ```
   
   Then we start t5.dc say. just when we start t5.dc, hudi detects pending commit and triggers a rollback. And this rollback will get an instant time of t6 (t6.rb). Note that rollback's commit time is greater than t5 or current ongoing delta commit. 
   So, once rollback completes, this is the layout.
   ```
   base file, lf1(from t2.dc partially failed), lf3 (rollback command block with t6). 
   ```
   
   And once t5.dc completes, this is how the layout looks like 
   ```
   base file, lf1(from t2.dc partially failed), lf3 (rollback command block with t6). lf4 (from t5) 
   ```
   
   At this point in time, when we trigger snapshot read or try to trigger tagLocation w/ global index, maxInstant is set to last entry among commits timeline which is t5. So, while LogRecordReader while processing all log blocks, when it reaches lf3, it detects the timestamp of t6 > t5 (i.e max instant time) and bails out of for loop. So, in essence it may even read lf4 in above scenario. 
   
   This patch attempts the fix the same. 
   
   Fix: 
   We only hold the constraint true for any data blocks and relax it for other block types. For eg, any data blocks > max instant time will be ignored. But all rollback blocks are taken into consideration. 
   
   
   ### Risk level (write none, low medium or high below)
   
   medium.
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none"._
   
   - _The config description must be updated if new configs are added or the default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
     ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [HUDI-8248] Fixing Log Record reader to include rollback blocks with timestamps > maxInstant times [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #11990:
URL: https://github.com/apache/hudi/pull/11990#issuecomment-2369909094

   Let's fix the compile error.


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [HUDI-8242] Fixing Log Record reader to include rollback blocks with timestamps > maxInstant times [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11990:
URL: https://github.com/apache/hudi/pull/11990#issuecomment-2369300738

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "14bc405c9fa6465f74c6d21533206022b816a393",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=729",
       "triggerID" : "14bc405c9fa6465f74c6d21533206022b816a393",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 14bc405c9fa6465f74c6d21533206022b816a393 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=729) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [HUDI-8242] Fixing Log Record reader to include rollback blocks with timestamps > maxInstant times [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11990:
URL: https://github.com/apache/hudi/pull/11990#issuecomment-2369226870

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "14bc405c9fa6465f74c6d21533206022b816a393",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "14bc405c9fa6465f74c6d21533206022b816a393",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 14bc405c9fa6465f74c6d21533206022b816a393 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [HUDI-8242] Fixing Log Record reader to include rollback blocks with timestamps > maxInstant times [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11990:
URL: https://github.com/apache/hudi/pull/11990#issuecomment-2369230104

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "14bc405c9fa6465f74c6d21533206022b816a393",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=729",
       "triggerID" : "14bc405c9fa6465f74c6d21533206022b816a393",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 14bc405c9fa6465f74c6d21533206022b816a393 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=729) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org