Lauri Ojansivu
d0378f33c2
Give old boards their keys in one pass, not one query per board.
...
v12.41 gave every board without a key one at startup by re-reading every
key of the instance for each board, and counting up from 2 again for every
board that shares a title: quadratic, and on 32,500 boards hours of slow
`{ key: { $exists: true } }` queries. Now the keys in use are read once,
the new keys are planned in memory with a counter per base
(models/lib/boardKey.js planBoardKeys, linear), and written in batches of
1000, each only where the board still has no key, so a key a board admin
set meanwhile is never replaced. A single new board reads only the keys
that could collide with its suggestion (an index range on the new `key`
index), not all of them. Planning 32,500 boards takes well under a second;
600 boards are written in under one on a running server.
Thanks to Raymond-Voogt and xet7 !
Fixes #6767 .
2026-10-14 13:13:55 +03:00
..
2026-09-30 11:08:10 +03:00
2026-10-07 16:15:44 +03:00
2026-09-30 11:12:25 +03:00
2026-06-20 14:39:41 +03:00
2026-08-22 23:50:26 +03:00
2026-10-14 09:28:45 +03:00
2026-06-20 17:45:43 +03:00
2026-10-10 14:24:44 +03:00
2026-06-20 14:40:13 +03:00
2026-09-26 01:27:36 +03:00
2026-09-11 21:17:33 +03:00
2026-06-20 17:45:43 +03:00
2026-09-29 16:40:48 +03:00
2026-10-14 13:13:55 +03:00
2026-06-20 19:16:35 +03:00
2026-07-13 19:08:29 +03:00
2026-06-20 14:38:28 +03:00
2026-08-07 18:20:23 +03:00
2026-07-24 03:23:37 +03:00
2026-09-28 17:40:49 +03:00
2026-10-10 11:44:19 +03:00
2026-09-29 17:59:21 +03:00
2026-08-08 03:46:39 +03:00
2026-07-05 16:48:58 +03:00
2026-05-13 22:32:38 +03:00
2026-06-20 17:44:51 +03:00
2026-06-20 04:10:36 +03:00
2026-06-20 19:17:01 +03:00
2026-10-03 09:44:45 +03:00
2026-09-28 12:55:11 +03:00
2026-06-20 14:40:13 +03:00
2026-10-14 13:11:23 +03:00
2026-10-03 08:52:16 +03:00
2026-10-03 10:20:29 +03:00
2026-10-14 08:20:49 +03:00
2026-10-10 15:26:46 +03:00
2026-06-20 19:17:01 +03:00
2026-06-20 19:54:30 +03:00
2026-06-15 20:08:42 +03:00
2026-10-11 13:12:21 +03:00
2026-10-01 19:18:58 +03:00
2026-08-04 00:24:05 +03:00
2026-06-20 14:38:50 +03:00
2026-10-02 20:58:00 +03:00
2026-10-14 07:35:20 +03:00
2026-09-28 14:06:15 +03:00
2026-10-13 18:27:25 +03:00
2026-10-14 07:35:20 +03:00
2026-10-08 12:08:29 +03:00
2026-10-13 18:27:25 +03:00
2026-10-13 18:27:25 +03:00
2026-06-22 15:46:43 +03:00
2026-07-05 16:48:58 +03:00
2026-09-15 10:35:31 +03:00
2026-10-14 08:20:49 +03:00
2026-07-05 16:48:58 +03:00
2026-06-20 14:40:13 +03:00
2026-07-14 17:01:35 +03:00
2026-07-14 14:03:32 +03:00
2026-09-30 10:52:45 +03:00
2026-10-14 13:11:23 +03:00
2026-05-27 20:51:44 +03:00
2026-10-14 09:28:45 +03:00
2026-10-02 15:26:22 +03:00
2026-09-28 17:23:15 +03:00
2026-10-08 11:51:44 +03:00
2026-06-20 19:20:22 +03:00
2026-06-20 19:17:01 +03:00
2026-10-14 09:28:45 +03:00
2026-10-08 11:53:06 +03:00
2026-10-02 19:34:47 +03:00
2026-10-08 12:35:58 +03:00
2026-09-28 04:55:55 +03:00
2026-10-10 15:28:26 +03:00
2026-09-28 05:07:25 +03:00
2026-07-26 03:18:31 +03:00
2026-07-05 16:48:58 +03:00
2026-06-15 12:54:59 +03:00
2026-06-20 19:16:35 +03:00
2026-06-20 19:17:00 +03:00
2026-10-14 11:03:53 +03:00
2026-10-03 14:26:15 +03:00
2026-10-03 10:26:48 +03:00
2026-09-28 23:43:32 +03:00
2026-10-08 12:06:49 +03:00
2026-09-30 10:20:20 +03:00
2026-10-02 20:53:38 +03:00
2026-10-02 19:43:30 +03:00
2026-10-03 09:49:31 +03:00
2026-10-08 12:36:57 +03:00
2026-05-07 15:57:42 +03:00
2026-07-23 14:04:12 +03:00
2026-10-14 09:28:45 +03:00
2026-09-28 13:49:39 +03:00
2026-09-30 11:03:37 +03:00
2026-09-30 12:17:20 +03:00
2026-09-30 12:17:20 +03:00
2026-10-02 16:52:15 +03:00
2026-10-10 11:44:19 +03:00
2026-10-03 00:08:13 +03:00
2026-10-10 11:44:19 +03:00
2026-10-02 17:53:05 +03:00
2026-09-28 05:32:01 +03:00
2026-09-30 12:17:20 +03:00
2026-06-20 19:54:54 +03:00
2026-10-10 15:25:16 +03:00
2026-06-20 19:54:30 +03:00
2026-09-30 12:17:20 +03:00
2026-06-20 17:45:43 +03:00
2026-09-28 04:37:02 +03:00
2026-09-29 16:51:47 +03:00
2026-09-28 16:21:11 +03:00
2026-06-20 17:47:56 +03:00
2026-09-30 02:41:45 +03:00
2025-11-02 09:11:50 +02:00
2026-09-10 20:04:07 +03:00
2026-06-20 19:54:30 +03:00
2026-10-02 15:09:58 +03:00