Commit a74911d
authored
Remove IndexMap document list (distributed-system-analysis#3606)
* Remove IndexMap document list
PBENCH-1315
The production server, with "only" 108,728 indexed datasets (many more still
haven't been migrated from the passthrough server), currently claims 84.1Gb of
PostgreSQL storage just for the `IndexMap` table. Most of this consists of a
list of each Opensearch document ID in order to allow using bulk update and
delete operations to manage the index. This is straining the capacity of our
RDU2 PostgreSQL server.
As an alternative, this PR removes the document list and instead of the bulk
update and delete operations uses `_delete_by_query` and `_update_by_query`
searching for documents in the appropriate indices (which we still store in
the `IndexMap`) by parent dataset resource ID.
Along the way, I noticed that (oops) we were missing the `"authorization"`
subdocument in some of our Elasticsearch documents, which would impact the
authenticated search API behaviors. And I acted on a deprecation warning for
a camelCase template keyword by replacing it with a snake_case alternative.1 parent 369736b commit a74911d
File tree
22 files changed
+603
-1681
lines changed- lib/pbench
- cli/server
- server
- api
- resources
- query_apis
- datasets
- database
- alembic
- versions
- models
- test
- functional/server
- unit/server
- database
- query_apis
- server/lib/mappings
22 files changed
+603
-1681
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
323 | 322 | | |
324 | 323 | | |
325 | 324 | | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | 325 | | |
331 | | - | |
332 | | - | |
| 326 | + | |
| 327 | + | |
333 | 328 | | |
334 | 329 | | |
335 | 330 | | |
| |||
338 | 333 | | |
339 | 334 | | |
340 | 335 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 336 | | |
348 | 337 | | |
349 | 338 | | |
| |||
359 | 348 | | |
360 | 349 | | |
361 | 350 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | 351 | | |
368 | 352 | | |
369 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | | - | |
| 1033 | + | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
| |||
0 commit comments