mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Merge pull request #10128 from appwrite/reduce-delete-batch-size
Reduce delete batch size
This commit is contained in:
commit
a756e533e8
1 changed files with 4 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue