Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8cd512e
Implement O(1) PKI index optimization using memory-mapped hash table
dwoz Apr 4, 2026
6752784
Optimize PKI lookups with memory-mapped hash index
dwoz Apr 4, 2026
c91c9c5
Fix mmap PKI index slot_size mismatch
dwoz Apr 4, 2026
ee89d68
Add regression test for mmap size mismatch
dwoz Apr 4, 2026
f7d6652
Implement fallback and size safety for PKI index
dwoz Apr 4, 2026
4f462aa
Fix cache driver signature and cleanup debug logs
dwoz Apr 4, 2026
4b1c774
Improve PKI index stability and performance
dwoz Apr 5, 2026
199a45a
Fix PKI index clustered paths and ownership
dwoz Apr 5, 2026
cbcbe26
Fix PKI index package test failures and clustered environment support
dwoz Apr 5, 2026
b3ffeda
Fix minion discovery and compound matching issues
dwoz Apr 5, 2026
cacecaa
Add driver check before PKI index rebuild
dwoz Apr 5, 2026
b8592f6
Robustness fixes for mmap cache and cross-platform reliability
dwoz Apr 5, 2026
391f7f1
Fix UnboundLocalError in salt/key.py by avoiding local salt.* imports
dwoz Apr 5, 2026
5fa9f25
Support multiple Master instances in same process and fix index permi…
dwoz Apr 6, 2026
3827b8f
Optimize mmap cache lifecycle and add multi-process locking
dwoz Apr 6, 2026
b19b95d
Optimize mmap cache lifecycle and robustify cross-platform locking
dwoz Apr 6, 2026
b87453d
Add debug logging to list_all to diagnose macOS/Windows failures
dwoz Apr 6, 2026
dfed95f
Relocate PKI index to cachedir and improve robustness
dwoz Apr 7, 2026
4d2d6be
Add extensive debug logging to PKI index and mmap cache
dwoz Apr 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/ref/runners/all/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ runner modules
net
network
pillar
pki
queue
reactor
salt
Expand Down
6 changes: 6 additions & 0 deletions doc/ref/runners/all/salt.runners.pki.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
salt.runners.pki
================

.. automodule:: salt.runners.pki
:members:
:undoc-members:
32 changes: 31 additions & 1 deletion salt/cache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, opts, cachedir=None, **kwargs):
def modules(self):
return salt.loader.cache(self.opts)

@cached_property
@property
def kwargs(self):
try:
return self.modules[f"{self.driver}.init_kwargs"](self._kwargs)
Expand Down Expand Up @@ -260,6 +260,36 @@ def list(self, bank):
fun = f"{self.driver}.list"
return self.modules[fun](bank, **self.kwargs)

def list_all(self, bank, include_data=False):
"""
Lists all entries with their data from the specified bank.
This is more efficient than calling list() + fetch() for each entry.

:param bank:
The name of the location inside the cache which will hold the key
and its associated data.

:param include_data:
Whether to include the full data for each entry. For some drivers
(like localfs_key), setting this to False avoids expensive disk reads.

:return:
A dict of {key: data} for all entries in the bank. Returns an empty
dict if the bank doesn't exist or the driver doesn't support list_all.

:raises SaltCacheError:
Raises an exception if cache driver detected an error accessing data
in the cache backend (auth, permissions, etc).
"""
fun = f"{self.driver}.list_all"
if fun in self.modules:
return self.modules[fun](bank, include_data=include_data, **self.kwargs)
else:
# Fallback for drivers that don't implement list_all
raise AttributeError(
f"Cache driver '{self.driver}' does not implement list_all"
)

def contains(self, bank, key=None):
"""
Checks if the specified bank contains the specified key.
Expand Down
Loading
Loading