From 4ee3a2e10a5dcd251579dbfa0331b1680d558d41 Mon Sep 17 00:00:00 2001 From: Roberto Dip Date: Mon, 26 Aug 2024 15:31:31 -0300 Subject: [PATCH] add missing comment (#21576) --- server/datastore/mysql/apple_mdm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/datastore/mysql/apple_mdm.go b/server/datastore/mysql/apple_mdm.go index 1cf1e0f423..5c6714a1ed 100644 --- a/server/datastore/mysql/apple_mdm.go +++ b/server/datastore/mysql/apple_mdm.go @@ -1713,6 +1713,10 @@ func (ds *Datastore) bulkSetPendingMDMAppleHostProfilesDB( ( hmap.host_uuid IS NOT NULL AND ( hmap.operation_type = ? OR hmap.operation_type IS NULL ) ) `, fmt.Sprintf(appleMDMProfilesDesiredStateQuery, "h.uuid IN (?)", "h.uuid IN (?)", "h.uuid IN (?)")) + // batches of 10K hosts because h.uuid appears three times in the + // query, and the max number of prepared statements is 65K, this was + // good enough during a load test and gives us wiggle room if we add + // more arguments and we forget to update the batch size. selectProfilesBatchSize := 10_000 if ds.testSelectMDMProfilesBatchSize > 0 { selectProfilesBatchSize = ds.testSelectMDMProfilesBatchSize