Skip to content

Commit 912a663

Browse files
authored
Revert "optimize pool.dataset.details (#15436)" (#15453)
This reverts commit a8f5e99.
1 parent 21b2b89 commit 912a663

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/middlewared/middlewared/plugins/pool_/dataset_details.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
PoolDatasetDetailsArgs,
77
PoolDatasetDetailsResults,
88
)
9-
from middlewared.plugins.boot import BOOT_POOL_NAME_VALID
109
from middlewared.plugins.zfs_.utils import zvol_path_to_name, TNUserProp
1110
from middlewared.service import Service, private
1211
from middlewared.utils.mount import getmntinfo
13-
from middlewared.utils.zfs import query_imported_fast_impl
1412

1513

1614
class PoolDatasetService(Service):
@@ -53,13 +51,19 @@ def build_filters_and_options(self):
5351
'snapshots_count': True,
5452
}
5553
}
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
6367

6468
@api_method(
6569
PoolDatasetDetailsArgs,

0 commit comments

Comments
 (0)