ishansurdi opened a new pull request, #3343:
URL: https://github.com/apache/avro/pull/3343

   ## What is the purpose of the change?
   
   This pull request improves the `_skip_sync` method to enhance readability, 
maintainability, and correctness when checking for sync markers.  
   Instead of using `seek(-SYNC_SIZE, 1)`, the method now stores the original 
file position using `tell()`, ensuring the read position can be reset 
explicitly when sync markers do not match.  
   
   ## Verifying this change
   
   This change is a **trivial rework / code cleanup** without affecting the 
core logic of the reader.  
   
   This change is already covered by existing tests, such as:  
   - Existing unit tests that verify proper sync marker detection and file 
position resetting.  
   
   Additionally, the change was manually verified by:  
   - Running integration tests with AVRO files of various sizes.  
   - Logging file positions before and after sync checks to confirm correct 
seek behavior.  
   
   ## Documentation
   
   - Does this pull request introduce a new feature? **No**
   - How is this change documented? **Not applicable (code comments included 
for clarity).**
   


-- 
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: dev-unsubscr...@avro.apache.org

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

Reply via email to