Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,130 changes: 970 additions & 160 deletions application/single_app/functions_data_management.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ function bindElements() {
"data_management_encryption_enabled",
"data_management_backup_max_parallel_operations",
"data_management_backup_retry_count",
"data_management_backup_blob_max_parallel_operations",
"data_management_backup_blob_chunk_size_mib",
"data_management_backup_blob_retry_count",
"data_management_backup_capacity_failure_policy",
"data_management_backup_temporary_source_ru_enabled",
"data-management-backup-temporary-ru-field",
Expand Down Expand Up @@ -475,6 +478,9 @@ function populateSettings(settings) {
setChecked(elements.datamanagementencryptionenabled, settings.encryption_enabled !== false);
setValue(elements.datamanagementbackupmaxparalleloperations, settings.backup_max_parallel_operations || 4);
setValue(elements.datamanagementbackupretrycount, settings.backup_retry_count || 5);
setValue(elements.datamanagementbackupblobmaxparalleloperations, settings.backup_blob_max_parallel_operations || 4);
setValue(elements.datamanagementbackupblobchunksizemib, settings.backup_blob_chunk_size_mib || 8);
setValue(elements.datamanagementbackupblobretrycount, settings.backup_blob_retry_count || 5);
setValue(elements.datamanagementbackupcapacityfailurepolicy, settings.backup_capacity_failure_policy || "continue_without_boost");
setChecked(elements.datamanagementbackuptemporarysourceruenabled, Boolean(settings.backup_temporary_source_ru_enabled));
setValue(elements.datamanagementbackuptemporarysourceru, settings.backup_temporary_source_ru || 10000);
Expand Down Expand Up @@ -667,6 +673,9 @@ function collectSettings() {
encryption_enabled: Boolean(elements.datamanagementencryptionenabled?.checked),
backup_max_parallel_operations: getNumberValue(elements.datamanagementbackupmaxparalleloperations, 4),
backup_retry_count: getNumberValue(elements.datamanagementbackupretrycount, 5),
backup_blob_max_parallel_operations: getNumberValue(elements.datamanagementbackupblobmaxparalleloperations, 4),
backup_blob_chunk_size_mib: getNumberValue(elements.datamanagementbackupblobchunksizemib, 8),
backup_blob_retry_count: getNumberValue(elements.datamanagementbackupblobretrycount, 5),
backup_capacity_failure_policy: getValue(elements.datamanagementbackupcapacityfailurepolicy) || "continue_without_boost",
backup_temporary_source_ru_enabled: Boolean(elements.datamanagementbackuptemporarysourceruenabled?.checked),
backup_temporary_source_ru: getNumberValue(elements.datamanagementbackuptemporarysourceru, 10000),
Expand Down
22 changes: 22 additions & 0 deletions application/single_app/templates/admin_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -5737,6 +5737,28 @@ <h5 class="mb-1">Cosmos Backup Performance</h5>
<p class="text-muted mb-0 small">Backups stream deterministic checkpoint batches and commit only verified work. Higher concurrency can increase source Cosmos cost and pressure.</p>
</div>
</div>

<div class="card p-3 mt-3 border-info-subtle" id="data-management-blob-backup-performance-section">
<div class="mb-3">
<h5 class="mb-1">Source Blob Backup Performance</h5>
<p class="text-muted mb-0 small">Source files stream through bounded chunks and durable per-file checkpoints. Peak transfer buffering is bounded by concurrent transfers multiplied by chunk size.</p>
</div>
<div class="row g-3">
<div class="col-md-4">
<label class="form-label" for="data_management_backup_blob_max_parallel_operations">Concurrent blob transfers</label>
<input class="form-control" type="number" id="data_management_backup_blob_max_parallel_operations" min="1" max="8" value="4" aria-describedby="data-management-backup-blob-memory-help">
</div>
<div class="col-md-4">
<label class="form-label" for="data_management_backup_blob_chunk_size_mib">Transfer chunk size (MiB)</label>
<input class="form-control" type="number" id="data_management_backup_blob_chunk_size_mib" min="1" max="16" value="8" aria-describedby="data-management-backup-blob-memory-help">
</div>
<div class="col-md-4">
<label class="form-label" for="data_management_backup_blob_retry_count">Blob retry attempts</label>
<input class="form-control" type="number" id="data_management_backup_blob_retry_count" min="1" max="10" value="5">
</div>
</div>
<div class="form-text mt-2" id="data-management-backup-blob-memory-help">Defaults bound application transfer buffering to approximately 32 MiB, excluding Azure SDK overhead. Throttling temporarily reduces active transfers.</div>
</div>
<div class="row g-3">
<div class="col-md-4">
<label class="form-label" for="data_management_backup_max_parallel_operations">Concurrent batch staging</label>
Expand Down
14 changes: 12 additions & 2 deletions docs/explanation/features/DATA_MANAGEMENT_BACKUP_MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Data Management Backup and Migration

Implemented in version: **0.241.211**
Updated in version: **0.250.101**
Updated in version: **0.250.102**

## Overview

Expand Down Expand Up @@ -67,6 +67,10 @@ Backup jobs write JSON/JSONL artifacts to the configured Azure Blob Storage cont
- Cosmos DB app data for settings, users/groups/workspaces, conversations, documents, agents, actions, prompts, and workspace identities.
- AI Search schemas and retrievable index documents for personal, group, and public indexes. Search documents are stored as deterministic page parts with schema fingerprints, source-window metadata, bounded part summaries, integrity status, and concurrent-write semantics in the artifact manifest.
- Optional source document blob backup can be enabled from the admin UI.
- Source document blobs use bounded concurrent Azure SDK block transfer,
source/target version verification, durable per-file outcomes, adaptive
throttling, and `raw-v1` or authenticated `fernet-chunked-v1` artifacts. See
[Data Management Source Blob Backup Throughput](DATA_MANAGEMENT_BLOB_BACKUP_THROUGHPUT.md).
- A manifest records artifact paths, app version, backup type, encryption status, and warnings.

### Job History and Backup Inventory
Expand Down Expand Up @@ -119,6 +123,9 @@ For durable provenance, destination access probes, collision protection, checkpo
- Source document blob backup is available only when Enhanced Citations is enabled. It defaults on when available and is disabled when Enhanced Citations is off.
- Backup encryption keys can be stored in Key Vault when Key Vault secret storage is enabled. If Key Vault is unavailable, generated keys fall back to the Data Management settings document and the admin UI recommends enabling Key Vault.
- Cosmos backup performance: bounded concurrent JSONL batch staging (default 4, maximum 16), retry attempts (default 5, maximum 10), and `continue_without_boost` or `fail` behavior when optional source capacity management cannot proceed.
- Source blob backup performance: concurrent file transfers (default 4, maximum
8), bounded chunk size in MiB (default 8, range 1-16), and independent retry
attempts (default 5, maximum 10).
- Temporary local/source Cosmos capacity boost: disabled by default; capped at 10,000 RU/s and restored from a durable source capacity snapshot.
- Target Cosmos authentication: managed identity or account key.
- Target Cosmos database name: always `SimpleChat`.
Expand Down Expand Up @@ -158,6 +165,9 @@ For optional local/source Cosmos backup capacity management, assign the App Serv
- Backup durability coverage: `functional_tests/test_data_management_backup_durability.py`.
- Parallel Cosmos backup, retry/adaptive pressure, source capacity restoration/recovery, fencing, resume, and sanitized telemetry coverage: `functional_tests/test_data_management_backup_parallelism.py`.
- AI Search keyset paging, >100,000 logical-result traversal, page concurrency, `429`/`503` recovery, resume, latest-state skips, schema/integrity validation, isolated index failure, and sanitized telemetry coverage: `functional_tests/test_data_management_ai_search_backup_export.py`.
- Source blob bounded transfer, encryption, resume, throttling, fencing, and
failure-isolation coverage:
`functional_tests/test_data_management_blob_backup_transfers.py`.
- UI/template coverage: `ui_tests/test_admin_data_management_settings_ui.py`.
- Scheduler/recovery, cancellation, retry, coordinator, provenance, and write-fence coverage remains in the focused `functional_tests/test_data_management_*` modules.
- Syntax validation: `python -m py_compile` for modified backend modules and `node --check` for the admin browser module.
Expand All @@ -173,5 +183,5 @@ For optional local/source Cosmos backup capacity management, assign the App Serv

## Version References

- Application version updated in `application/single_app/config.py` to `0.250.101`.
- Application version updated in `application/single_app/config.py` to `0.250.102`.
- Functional and UI tests include the same implementation version.
Loading
Loading