[
https://issues.apache.org/jira/browse/SOLR-17805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17987369#comment-17987369
]
ASF subversion and git services commented on SOLR-17805:
--------------------------------------------------------
Commit a931e8a356c2378e49386ac3993516b3637a3c75 in solr's branch
refs/heads/main from Bruno Roustant
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=a931e8a356c ]
SOLR-17805: Exception in TransactionLog constructor deletes the file and does
not block subsequent updates. (#3412)
> Transaction log constructor can fail and leave a file that blocks the update
> log.
> ---------------------------------------------------------------------------------
>
> Key: SOLR-17805
> URL: https://issues.apache.org/jira/browse/SOLR-17805
> Project: Solr
> Issue Type: Bug
> Affects Versions: 9.8.1
> Reporter: Bruno Roustant
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> 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 message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]