dybyte opened a new pull request, #23697:
URL: https://github.com/apache/kafka/pull/23697

   LogManager.createLog handles an IOException from creating the partition 
directory by marking the log dir offline and throwing KafkaStorageException. 
The next step, UnifiedLog.create, can also throw IOException (for example a 
full disk, too many open files or a read-only file system), but that exception 
is not handled. ReplicaManager only catches KafkaStorageException when applying 
leader changes, so the partition never becomes leader, the log dir is not 
marked offline, and the controller never moves leadership. Clients hang until 
the broker restarts.
   This change handles that IOException the same way as createLogDirectory: it 
marks the log dir offline through LogDirFailureChannel and throws 
KafkaStorageException.
   Testing: a new LogManagerTest case makes UnifiedLog.create fail after the 
partition directory is created, and checks that KafkaStorageException is 
thrown, the log dir is marked offline, and no log is registered. It fails 
without this change.
   


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