prateeksinghalgit opened a new pull request, #3750:
URL: https://github.com/apache/solr/pull/3750

   
   
   <!--
   _(If you are a project committer then you may remove some/all of the 
following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system 
for Solr:
   
   * https://issues.apache.org/jira/projects/SOLR
   
   For something minor (i.e. that wouldn't be worth putting in release notes), 
you can skip JIRA. 
   To create a Jira issue, you will need to create an account there first.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * SOLR-####: <short description of problem or changes>
   
   SOLR must be fully capitalized. A short description helps people scanning 
pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly 
updated with code review comments and commits. -->
   
   Implements Azure Blob Storage backup repository as discussed in 
[SOLR-17949](https://issues.apache.org/jira/browse/SOLR-17949).
   
   # Description
   
   This PR adds a new backup repository implementation for Azure Blob Storage, 
enabling Solr collections to be backed up to and restored from Microsoft Azure.
   
   **Key Features:**
   - Full backup/restore functionality to Azure Blob Storage
   - Support for 4 authentication methods (Connection String, Account Key, SAS 
Token, Azure Identity)
   - Incremental backup support with versioning
   - Data integrity verification (checksum validation)
   - Compatible with Azurite emulator for local testing
   - Comprehensive documentation and 76 passing unit tests
   
   # Solution
   
   The implementation follows Solr's `BackupRepository` interface pattern, 
similar to existing S3 and GCS repository modules:
   
   - **BlobBackupRepository**: Main class implementing Solr's 
`BackupRepository` interface
   - **BlobStorageClient**: Wrapper for Azure SDK, providing file operations
   - **BlobIndexInput**: Custom Lucene `IndexInput` for reading from Azure blobs
   - **BlobOutputStream**: Custom output stream for writing to Azure blobs
   - **Authentication**: Supports 4 methods via flexible configuration in 
`solr.xml`
   
   All streaming operations are compatible with Solr's `ResumableInputStream` 
for fault-tolerant transfers.
   
   **Implementation stats:**
   - 8 implementation files (1,606 LOC)
   - 8 test files (2,180 LOC)
   - All dependencies Apache 2.0 licensed
   
   # Tests
   **Unit Tests:** 76/76 passing (100%)
   
   ```bash
   ./gradlew :solr:modules:blob-repository:test
   # Result: BUILD SUCCESSFUL - 76 test(s)
   ```
   
   **Test Coverage:**
   - Basic read/write operations
   - Large file handling (1GB+)
   - Binary data integrity
   - Concurrent operations
   - Stream lifecycle (close/resume behavior)
   - Incremental backups
   - All 4 authentication methods
   - Integration with Azurite (local emulator)
   - Integration with real Azure Blob Storage
   
   **Testing Instructions:**
   Can be tested locally with Azurite emulator (no Azure account needed) or 
with real Azure Blob Storage. See `solr/modules/blob-repository/README.md` for 
detailed setup instructions.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [ ] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended, not available for 
branches on forks living under an organisation)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew :solr:modules:blob-repository:check` 
(module-specific check passed).
   - [x] I have added tests for my changes.
   - [x] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


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