From 9cc61d89f006fb55109aebd28fdda0fbd8bcbdf9 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 9 Jul 2025 14:00:08 +0300 Subject: [PATCH 1/3] $deleteBatchSize --- src/Appwrite/Platform/Workers/Deletes.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index 2f41001b58..a4e03bba92 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -1117,6 +1117,9 @@ class Deletes extends Action ): void { $start = \microtime(true); + $deleteBatchSize = Database::DELETE_BATCH_SIZE; + $deleteBatchSize = 300; + /** * 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) { From 3a298b7a213db3c8904d506908882c88c029581e Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 9 Jul 2025 14:32:47 +0300 Subject: [PATCH 2/3] Change to 500 --- src/Appwrite/Platform/Workers/Deletes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index a4e03bba92..e2fe6c30ca 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -1118,7 +1118,7 @@ class Deletes extends Action $start = \microtime(true); $deleteBatchSize = Database::DELETE_BATCH_SIZE; - $deleteBatchSize = 300; + $deleteBatchSize = 500; /** * deleteDocuments uses a cursor, we need to add a unique order by field or use default From 449b9295fd4a16174bb0f3df73539afac630982b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 9 Jul 2025 13:42:18 +0200 Subject: [PATCH 3/3] Update src/Appwrite/Platform/Workers/Deletes.php --- src/Appwrite/Platform/Workers/Deletes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Deletes.php b/src/Appwrite/Platform/Workers/Deletes.php index e2fe6c30ca..aa511c2209 100644 --- a/src/Appwrite/Platform/Workers/Deletes.php +++ b/src/Appwrite/Platform/Workers/Deletes.php @@ -1118,7 +1118,7 @@ class Deletes extends Action $start = \microtime(true); $deleteBatchSize = Database::DELETE_BATCH_SIZE; - $deleteBatchSize = 500; + $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