Best-effort removal of the immediately-prior version (the common single-mutation case).
( table: TableDefinition, version: number, shapeHash: string )
| 130 | |
| 131 | /** Best-effort removal of the immediately-prior version (the common single-mutation case). */ |
| 132 | async function deletePreviousVersion( |
| 133 | table: TableDefinition, |
| 134 | version: number, |
| 135 | shapeHash: string |
| 136 | ): Promise<void> { |
| 137 | if (version <= 0) return |
| 138 | await deleteFile({ |
| 139 | key: snapshotKey(table.workspaceId, table.id, version - 1, shapeHash), |
| 140 | context: SNAPSHOT_STORAGE_CONTEXT, |
| 141 | }).catch(() => {}) |
| 142 | } |
| 143 | |
| 144 | /** |
| 145 | * Returns the storage key + size of the table's snapshot at its current `rows_version`, |
no test coverage detected