You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2021/12/11 00:28:46 UTC

[GitHub] [incubator-teaclave] m4sterchain opened a new pull request #587: [Fix] Improve log writer and tolerate log reader

m4sterchain opened a new pull request #587:
URL: https://github.com/apache/incubator-teaclave/pull/587


   ## Description
   
   When the DB is in persistent mode, DB's log files are read back to memory every time after DB restarts. However, some log records might cause the Log Reader's offset to grow larger than the block size.
   
   This PR changed tolerate this corner case by resetting the offset to 0. As each record checks its own checksum during loading, this modification would not introduce data inconsistent issues.
   
   Another modification in this PR is optimizing the log writer logic. Instead of multiple file-writes for a single record, we use a temporal vector to hold the whole record and write the complete buffer to file in a single write operation.
   
   
   ## Type of change (select or add applied and delete the others)
   
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] API change with a documentation update
   - [ ] Additional test coverage
   - [ ] Code cleanup or just sync with upstream third-party crates
   
   ## How has this been tested?
   
   ## Checklist
   
   - [ ] Fork the repo and create your branch from `master`.
   - [ ] If you've added code that should be tested, add tests.
   - [ ] If you've changed APIs, update the documentation.
   - [ ] Ensure the tests pass (see CI results).
   - [ ] Make sure your code lints/format.
   


-- 
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: notifications-unsubscribe@teaclave.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun merged pull request #587: [Fix] Improve log writer and tolerate log reader

Posted by GitBox <gi...@apache.org>.
mssun merged pull request #587:
URL: https://github.com/apache/incubator-teaclave/pull/587


   


-- 
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: notifications-unsubscribe@teaclave.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org


[GitHub] [incubator-teaclave] mssun merged pull request #587: [Fix] Improve log writer and tolerate log reader

Posted by GitBox <gi...@apache.org>.
mssun merged pull request #587:
URL: https://github.com/apache/incubator-teaclave/pull/587


   


-- 
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: notifications-unsubscribe@teaclave.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org