[ 
https://issues.apache.org/jira/browse/SOLR-18249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120971#comment-18120971
 ] 

Nick Shanin commented on SOLR-18249:
------------------------------------

I opened PR #4969 for SOLR-18249.

ShardBackupMetadata.store overwrote the previous metadata file in place, so a 
crash mid-write could destroy the only good copy. The PR stages the new 
metadata in a sibling temp file and publishes it with a requested atomic move 
(failing closed where atomic moves are unsupported), with temp cleanup on 
failure.

ShardBackupMetadataTest (5 cases) and the scoped core/solrj checks passed.

PR: https://github.com/apache/solr/pull/4969

> Fix non-atomic write in ShardBackupMetadata.store() that can destroy backup 
> metadata
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-18249
>                 URL: https://issues.apache.org/jira/browse/SOLR-18249
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Robert Miller
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Make atomic for S3 and GCS, reduce chance for LocalFS.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to