Merge pull request #10128 from appwrite/reduce-delete-batch-size

Reduce delete batch size
This commit is contained in:
Matej Bačo 2025-07-09 13:46:03 +02:00 committed by GitHub
commit a756e533e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1117,6 +1117,9 @@ class Deletes extends Action
): void {
$start = \microtime(true);
$deleteBatchSize = Database::DELETE_BATCH_SIZE;
$deleteBatchSize = 500; // TODO: Set right value in DB library after investigation
/**
* deleteDocuments uses a cursor, we need to add a unique order by field or use default
*/
@ -1124,7 +1127,7 @@ class Deletes extends Action
$count = $database->deleteDocuments(
$collection,
$queries,
Database::DELETE_BATCH_SIZE,
$deleteBatchSize,
$callback
);
} catch (Throwable $th) {