bruno-roustant opened a new pull request, #3412:
URL: https://github.com/apache/solr/pull/3412

   
   https://issues.apache.org/jira/browse/SOLR-17805
   
   TransactionLog constructor can either open an existing log, or create a new 
log. When it is required to create a new log, it first creates a new empty log 
file and then opens an output stream on it.
   
   After the new empty log file is created, if an exception occurs when 
creating the output stream (e.g. disk full, encryption key not available), the 
TransactionLog object is not created, but the empty file is left. The problem 
is that UpdateLog does not update its "id" field which should point to the next 
(non-existing) transaction log id, instead it continues to point to the empty 
log file. This completely blocks the logic in UpdateLog.ensureLog() and 
TransactionLog constructor will always refuse to create a new transaction log, 
throwing "New transaction log already exists" for each update, effectively 
blocking all subsequent updates, until the Solr server is restarted.
   
   The proposed fix is to
   
   1- Delete the created empty log file is an exception is thrown inside the 
TransactionLog constructor.
   2- Fix the error code inconsistency between DirectUpdateHandler2.addDoc() 
(which currently sets a 4xx code) and 
RequestHandlerBase.normalizeReceivedException() (which currently asserts a 5xx 
code).


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