littlepangdi opened a new pull request, #614:
URL: https://github.com/apache/ozhera/pull/614

   <!--
   
       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
   
   -->
   
   <!-- Please make sure you have read and understood the contributing 
guidelines -->
   
   ### Ⅰ. Describe what this PR did
   Main changes:
   1. Enhanced file read exception handling: Added exception classification and 
automatic retry mechanism (max 5 times), distinguishing permission errors, file 
not found, and IO errors
   2. Added runtime file truncation detection: Check every 15 seconds, handle 
immediate truncation immediately, support copytruncate log rotation scenarios
   3. Optimized fast log rotation handling: Critical rotation events (inode 
change/truncation) frequency limit reduced from 10s to 1s, detection interval 
optimized from 60s to 15s
   4. Improved file not found handling: Continue monitoring when file doesn't 
exist, automatically start collection when file is created
   5. Optimized resource cleanup: Clean up exception count and truncation check 
Maps in cleanFile and close methods
   
   Issues fixed:
   - Permanent collection stop due to temporary IO errors
   - Data loss in fast log rotation scenarios (30 seconds)
   - Excessive delay in file truncation detection (up to 60 seconds)
   - Unable to monitor correctly when file doesn't exist
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes 
#97. -->
   
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   
   
   ### Ⅳ. Describe how to verify it
   
   
   ### Ⅴ. Special notes for reviews
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to