|
6 | 6 | PoolDatasetDetailsArgs,
|
7 | 7 | PoolDatasetDetailsResults,
|
8 | 8 | )
|
9 |
| -from middlewared.plugins.boot import BOOT_POOL_NAME_VALID |
10 | 9 | from middlewared.plugins.zfs_.utils import zvol_path_to_name, TNUserProp
|
11 | 10 | from middlewared.service import Service, private
|
12 | 11 | from middlewared.utils.mount import getmntinfo
|
13 |
| -from middlewared.utils.zfs import query_imported_fast_impl |
14 | 12 |
|
15 | 13 |
|
16 | 14 | class PoolDatasetService(Service):
|
@@ -53,13 +51,19 @@ def build_filters_and_options(self):
|
53 | 51 | 'snapshots_count': True,
|
54 | 52 | }
|
55 | 53 | }
|
56 |
| - valid_pools = list() |
57 |
| - for i in query_imported_fast_impl().values(): |
58 |
| - if i['name'] not in BOOT_POOL_NAME_VALID: |
59 |
| - valid_pools.append(i['name']) |
60 |
| - |
61 |
| - return [['name', 'in', valid_pools]], options |
62 |
| - |
| 54 | + # FIXME: this is querying boot-pool datasets |
| 55 | + # because of how bad our pool.dataset.query API |
| 56 | + # is designed. If boot pool has a few old BE's, |
| 57 | + # then this endpoint slows down exponentially |
| 58 | + # which makes sense, because we have like 10/11 |
| 59 | + # datasets on the boot drive. So multiply that |
| 60 | + # value by number of BEs and you're asking ZFS |
| 61 | + # for a bunch of unnecessary data. |
| 62 | + # valid_pools = list() |
| 63 | + # for i in query_imported_fast_impl().values(): |
| 64 | + # if i['name'] not in BOOT_POOL_NAME_VALID: |
| 65 | + # valid_pools.append(i['name']) |
| 66 | + return [], options |
63 | 67 |
|
64 | 68 | @api_method(
|
65 | 69 | PoolDatasetDetailsArgs,
|
|
0 commit comments