Merge pull request #22115 from overleaf/jpa-skip-get

[history-v1] back_fill_file_hash: optimize obtaining the DEK

GitOrigin-RevId: 6fc5218737551ae4e6152414c32560f545767091
This commit is contained in:
Jakob Ackermann
2024-11-25 13:07:15 +01:00
committed by Copybot
parent ed27af11f8
commit 0bd8729cc1
3 changed files with 59 additions and 2 deletions

View File

@@ -177,10 +177,13 @@ class PerProjectEncryptedS3Persistor extends S3Persistor {
/**
* @param {string} bucketName
* @param {string} path
* @return {Promise<void>}
* @return {Promise<CachedPerProjectEncryptedS3Persistor>}
*/
async generateDataEncryptionKey(bucketName, path) {
await this.#generateDataEncryptionKeyOptions(bucketName, path)
return new CachedPerProjectEncryptedS3Persistor(
this,
await this.#generateDataEncryptionKeyOptions(bucketName, path)
)
}
/**